From 7dc8f02abbd8ab75b9b0ddfcf7ff40e206e63ecb Mon Sep 17 00:00:00 2001 From: Polybius93 Date: Tue, 26 Sep 2023 14:58:09 +0200 Subject: [PATCH] fixup! feat: added custom bitcoin regtest network option --- src/app/common/hooks/use-bitcoin-contracts.ts | 2 +- .../flows/request-bitcoin-keys/request-bitcoin-keys.utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/common/hooks/use-bitcoin-contracts.ts b/src/app/common/hooks/use-bitcoin-contracts.ts index efa91f831cc..b428712c435 100644 --- a/src/app/common/hooks/use-bitcoin-contracts.ts +++ b/src/app/common/hooks/use-bitcoin-contracts.ts @@ -62,6 +62,7 @@ export function useBitcoinContracts() { const getNativeSegwitSigner = useCurrentAccountNativeSegwitSigner(); const currentIndex = useCurrentAccountIndex(); const nativeSegwitPrivateKeychain = useNativeSegwitAccountBuilder()?.(currentIndex); + const currentNetwork = useCurrentNetwork(); async function getBitcoinContractInterface( attestorURLs: string[] @@ -73,7 +74,6 @@ export function useBitcoinContracts() { const currentBitcoinNetwork = bitcoinAccountDetails.network; const currentAddress = bitcoinAccountDetails.address; const currentAccountIndex = extractAddressIndexFromPath(bitcoinAccountDetails.derivationPath); - const currentNetwork = useCurrentNetwork(); const currentAddressPrivateKey = deriveAddressIndexKeychainFromAccount( nativeSegwitPrivateKeychain.keychain diff --git a/src/app/features/ledger/flows/request-bitcoin-keys/request-bitcoin-keys.utils.ts b/src/app/features/ledger/flows/request-bitcoin-keys/request-bitcoin-keys.utils.ts index 636afcf5996..29fb7cc719a 100644 --- a/src/app/features/ledger/flows/request-bitcoin-keys/request-bitcoin-keys.utils.ts +++ b/src/app/features/ledger/flows/request-bitcoin-keys/request-bitcoin-keys.utils.ts @@ -20,7 +20,7 @@ interface GetPolicyForPaymentTypeFactoryArgs { interface GetExtendedPublicKeyFactoryArgs { bitcoinApp: BitcoinApp; fingerprint: string; - network: NetworkModes; + network: BitcoinNetworkModes; accountIndex: number; } function getPolicyForPaymentType({ @@ -52,7 +52,7 @@ const getTaprootExtendedPublicKey = getPolicyForPaymentType({ interface PullBitcoinKeysFromLedgerDeviceArgs { onRequestKey?(keyIndex: number): void; - network: NetworkModes; + network: BitcoinNetworkModes; } export function pullBitcoinKeysFromLedgerDevice(bitcoinApp: BitcoinApp) { return async ({ onRequestKey, network }: PullBitcoinKeysFromLedgerDeviceArgs) => {