mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
feat: xpub restore from bitcoin URI QR
This commit is contained in:
parent
cde1274def
commit
a4a40356a3
2 changed files with 7 additions and 2 deletions
|
@ -44,6 +44,7 @@ class RestoredWallet {
|
|||
} catch (e) {
|
||||
// fine, we don't care, it is only for monero anyway
|
||||
}
|
||||
json['view_key'] ??= json['xpub'];
|
||||
final height = json['height'] as String?;
|
||||
return RestoredWallet(
|
||||
restoreMode: json['mode'] as WalletRestoreMode,
|
||||
|
|
|
@ -158,6 +158,10 @@ class WalletRestoreFromQRCode {
|
|||
throw Exception('Unexpected restore mode: tx_payment_id is invalid');
|
||||
}
|
||||
|
||||
if (credentials.containsKey("xpub")) {
|
||||
return WalletRestoreMode.keys;
|
||||
}
|
||||
|
||||
if (credentials['seed'] != null) {
|
||||
final seedValue = credentials['seed'] as String;
|
||||
final words = SeedValidator.getWordList(type: type, language: 'english');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue