2023-12-02 09:42:00 +00:00
|
|
|
import 'package:cw_zano/api/model/recent_history.dart';
|
|
|
|
import 'package:cw_zano/api/model/wi.dart';
|
|
|
|
|
2023-12-14 04:51:16 +00:00
|
|
|
class CreateWalletResult {
|
2023-12-02 09:42:00 +00:00
|
|
|
final String name;
|
|
|
|
final String pass;
|
|
|
|
final RecentHistory recentHistory;
|
|
|
|
final bool recovered;
|
|
|
|
final String seed;
|
|
|
|
final int walletFileSize;
|
|
|
|
final int walletId;
|
|
|
|
final int walletLocalBcSize;
|
|
|
|
final Wi wi;
|
|
|
|
|
2023-12-14 04:51:16 +00:00
|
|
|
CreateWalletResult(
|
2023-12-02 09:42:00 +00:00
|
|
|
{required this.name,
|
|
|
|
required this.pass,
|
|
|
|
required this.recentHistory,
|
|
|
|
required this.recovered,
|
|
|
|
required this.seed,
|
|
|
|
required this.walletFileSize,
|
|
|
|
required this.walletId,
|
|
|
|
required this.walletLocalBcSize,
|
|
|
|
required this.wi});
|
|
|
|
|
2023-12-14 04:51:16 +00:00
|
|
|
factory CreateWalletResult.fromJson(Map<String, dynamic> json) =>
|
|
|
|
CreateWalletResult(
|
2024-03-10 02:51:30 +00:00
|
|
|
name: json['name'] as String? ?? '',
|
|
|
|
pass: json['pass'] as String? ?? '',
|
2023-12-02 09:42:00 +00:00
|
|
|
recentHistory: RecentHistory.fromJson(
|
2024-03-10 02:51:30 +00:00
|
|
|
json['recent_history'] as Map<String, dynamic>? ?? {}),
|
|
|
|
recovered: json['recovered'] as bool? ?? false,
|
|
|
|
seed: json['seed'] as String? ?? '',
|
|
|
|
walletFileSize: json['wallet_file_size'] as int? ?? 0,
|
|
|
|
walletId: json['wallet_id'] as int? ?? 0,
|
|
|
|
walletLocalBcSize: json['wallet_local_bc_size'] as int? ?? 0,
|
|
|
|
wi: Wi.fromJson(json['wi'] as Map<String, dynamic>? ?? {}),
|
2023-12-02 09:42:00 +00:00
|
|
|
);
|
|
|
|
}
|