mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
added logging for get status/get info
This commit is contained in:
parent
3c2953a718
commit
e1da71a1d1
1 changed files with 2 additions and 0 deletions
|
@ -56,12 +56,14 @@ class SyncListener {
|
|||
}*/
|
||||
|
||||
var json = ApiCalls.getWalletStatus(hWallet: hWallet);
|
||||
print('wallet status $json');
|
||||
final status = GetWalletStatusResult.fromJson(jsonDecode(json) as Map<String, dynamic>);
|
||||
// You can call getWalletInfo ONLY if getWalletStatus returns NOT is in long refresh and wallet state is 2 (ready)
|
||||
if (!status.isInLongRefresh && status.walletState == 2) {
|
||||
final syncHeight = status.currentWalletHeight;
|
||||
|
||||
json = ApiCalls.getWalletInfo(hWallet);
|
||||
print('wallet info $json');
|
||||
final result = GetWalletInfoResult.fromJson(jsonDecode(json) as Map<String, dynamic>);
|
||||
wallet.seed = result.wiExtended.seed;
|
||||
wallet.keys = ZanoWalletKeys(
|
||||
|
|
Loading…
Reference in a new issue