getLastNonce method
Implementation
Future<int> getLastNonce(String address) async {
DnaGetBalanceResponse dnaGetBalanceResponse = new DnaGetBalanceResponse();
dnaGetBalanceResponse = await getBalanceGetResponse(address);
Completer<int> _completer = new Completer<int>();
if (dnaGetBalanceResponse != null &&
dnaGetBalanceResponse.result != null &&
dnaGetBalanceResponse.result.nonce != null) {
_completer.complete(dnaGetBalanceResponse.result.nonce);
} else {
_completer.complete(1);
}
return _completer.future;
}