mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
feat: handle label restore field from cupcake (#2551)
This commit is contained in:
@@ -9,6 +9,7 @@ class RestoredWallet {
|
||||
{required this.restoreMode,
|
||||
required this.type,
|
||||
required this.address,
|
||||
this.name,
|
||||
this.txId,
|
||||
this.spendKey,
|
||||
this.viewKey,
|
||||
@@ -22,6 +23,7 @@ class RestoredWallet {
|
||||
|
||||
final WalletRestoreMode restoreMode;
|
||||
final WalletType type;
|
||||
final String? name;
|
||||
final String? address;
|
||||
final String? txId;
|
||||
final String? spendKey;
|
||||
@@ -41,6 +43,7 @@ class RestoredWallet {
|
||||
json['address'] = codeParsed["primaryAddress"];
|
||||
json['view_key'] = codeParsed["privateViewKey"];
|
||||
json['height'] = codeParsed["restoreHeight"].toString();
|
||||
json['label'] = codeParsed["label"];
|
||||
}
|
||||
} catch (e) {
|
||||
// fine, we don't care, it is only for monero anyway
|
||||
@@ -51,6 +54,7 @@ class RestoredWallet {
|
||||
json['view_key'] ??= json['xpub'];
|
||||
final height = json['height'] as String?;
|
||||
return RestoredWallet(
|
||||
name: json['label'] as String?,
|
||||
restoreMode: json['mode'] as WalletRestoreMode,
|
||||
type: json['type'] as WalletType,
|
||||
address: json['address'] as String?,
|
||||
|
||||
Reference in New Issue
Block a user