mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 04:49: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) {
|
} catch (e) {
|
||||||
// fine, we don't care, it is only for monero anyway
|
// fine, we don't care, it is only for monero anyway
|
||||||
}
|
}
|
||||||
|
json['view_key'] ??= json['xpub'];
|
||||||
final height = json['height'] as String?;
|
final height = json['height'] as String?;
|
||||||
return RestoredWallet(
|
return RestoredWallet(
|
||||||
restoreMode: json['mode'] as WalletRestoreMode,
|
restoreMode: json['mode'] as WalletRestoreMode,
|
||||||
|
|
|
@ -158,6 +158,10 @@ class WalletRestoreFromQRCode {
|
||||||
throw Exception('Unexpected restore mode: tx_payment_id is invalid');
|
throw Exception('Unexpected restore mode: tx_payment_id is invalid');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (credentials.containsKey("xpub")) {
|
||||||
|
return WalletRestoreMode.keys;
|
||||||
|
}
|
||||||
|
|
||||||
if (credentials['seed'] != null) {
|
if (credentials['seed'] != null) {
|
||||||
final seedValue = credentials['seed'] as String;
|
final seedValue = credentials['seed'] as String;
|
||||||
final words = SeedValidator.getWordList(type: type, language: 'english');
|
final words = SeedValidator.getWordList(type: type, language: 'english');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue