mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
feat: show Bitcoin master fingerprint in wallet keys (#3489)
* feat: show Bitcoin master fingerprint in wallet keys Add the BIP-32 master fingerprint (XFP) to the Bitcoin wallet keys shown under Settings > Seed & Keys > Keys, labeled "Master fingerprint". * fix: keep xPub in Keys tab by splitting silent payment keys into a dedicated list The Keys tab / Silent Payments tab split relied on a hardcoded item index (`items.sublist(0, 4)` / `sublist(4)`) that assumed the first four items were always WIF/private key/public key/xPub. Adding the master fingerprint as the first item pushed xPub into the Silent Payments tab. Route Bitcoin silent payment keys into their own `silentPaymentItems` list instead, and render each tab from its list.
This commit is contained in:
@@ -78,7 +78,7 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
|
||||
|
||||
showKeyTab = widget.walletKeysViewModel.items.isNotEmpty;
|
||||
showSilentPaymentsTab =
|
||||
widget.walletKeysViewModel.isBitcoin && widget.walletKeysViewModel.items.length > 4;
|
||||
widget.walletKeysViewModel.isBitcoin && widget.walletKeysViewModel.silentPaymentItems.isNotEmpty;
|
||||
showLegacySeedTab = widget.walletKeysViewModel.legacySeedSplit.isNotEmpty;
|
||||
isLegacySeedOnly = widget.walletKeysViewModel.isLegacySeedOnly;
|
||||
|
||||
@@ -157,16 +157,12 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
|
||||
if (showKeyTab)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22),
|
||||
child: _buildKeysTab(
|
||||
context,
|
||||
showSilentPaymentsTab
|
||||
? widget.walletKeysViewModel.items.sublist(0, 4)
|
||||
: widget.walletKeysViewModel.items),
|
||||
child: _buildKeysTab(context, widget.walletKeysViewModel.items),
|
||||
),
|
||||
if (showSilentPaymentsTab)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 22, right: 22),
|
||||
child: _buildKeysTab(context, widget.walletKeysViewModel.items.sublist(4)),
|
||||
child: _buildKeysTab(context, widget.walletKeysViewModel.silentPaymentItems),
|
||||
),
|
||||
if (showLegacySeedTab)
|
||||
Padding(
|
||||
|
||||
Reference in New Issue
Block a user