dev
dart 25 lines 957 Bytes
Raw
1 class GetWalletStatusResult {
2 final int currentDaemonHeight;
3 final int currentWalletHeight;
4 final bool isDaemonConnected;
5 final bool isInLongRefresh;
6 final int progress;
7 final int walletState;
8
9 GetWalletStatusResult(
10 {required this.currentDaemonHeight,
11 required this.currentWalletHeight,
12 required this.isDaemonConnected,
13 required this.isInLongRefresh,
14 required this.progress,
15 required this.walletState});
16
17 factory GetWalletStatusResult.fromJson(Map<String, dynamic> json) => GetWalletStatusResult(
18 currentDaemonHeight: json['current_daemon_height'] as int? ?? 0,
19 currentWalletHeight: json['current_wallet_height'] as int? ?? 0,
20 isDaemonConnected: json['is_daemon_connected'] as bool? ?? false,
21 isInLongRefresh: json['is_in_long_refresh'] as bool? ?? false,
22 progress: json['progress'] as int? ?? 0,
23 walletState: json['wallet_state'] as int? ?? 0,
24 );
25 }