accountIsActive method
Checks if an account is active based on the provided address
.
Returns true
if the account exists, otherwise false
.
Implementation
Future<bool> accountIsActive(AptosAddress address) async {
try {
await provider.request(AptosRequestGetAccount(address: address));
return true;
} on RPCError catch (e) {
if (e.details?["error_code"] ==
AptosProviderConst.accountNotFoundErrorCode) {
return false;
}
rethrow;
}
}