getCurrentAddress method

  1. @override
String getCurrentAddress()

Get the current address for the wallet state

Returns the current address of the wallet state as a string in base58 encoding

Implementation

@override
String getCurrentAddress() {
  final cartesianResult = cartesiansStore.findFirstSync(
    _instance,
    finder: Finder(
      filter: Filter.and([
        Filter.equals("xFellowship", 1),
        Filter.equals("yContract", 1),
      ]),
      sortOrders: [SortOrder("zState", false)],
    ),
  );

  if (cartesianResult != null) return cartesianResult["address"]! as String;
  throw Exception('No address found');
}