Skip to content

Commit

Permalink
fix: fixed typecheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Oct 12, 2023
1 parent 2b1f358 commit 259b493
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/app/features/asset-list/asset-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { CryptoCurrencyAssetItem } from '@app/components/crypto-assets/crypto-cu
import { BtcIcon } from '@app/components/icons/btc-icon';
import { CurrentStacksAccountLoader } from '@app/components/stacks-account-loader';
import { useCurrentAccountNativeSegwitAddressIndexZero } from '@app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks';
import { useCurrentNetwork } from '@app/store/networks/networks.selectors';

import { Collectibles } from '../collectibles/collectibles';
import { PendingBrc20TransferList } from '../pending-brc-20-transfers/pending-brc-20-transfers';
Expand Down
2 changes: 1 addition & 1 deletion src/app/query/bitcoin/ordinals/brc20/use-brc-20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function useBrc20FeatureFlag() {

const supportedNetwork =
currentNetwork.chain.bitcoin.bitcoinNetwork === 'mainnet' ||
currentNetwork.chain.bitcoin.bitcoinNetworketwork === 'signet';
currentNetwork.chain.bitcoin.bitcoinNetwork === 'signet';

if (!supportedNetwork) return { enabled: false, reason: 'Unsupported network' } as const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,11 @@ export function useNativeSegwitNetworkSigners() {
const {
mainnet: mainnetKeychain,
testnet: testnetKeychain,
regtest: regtestKeychain,
} = useSelector(selectNativeSegwitAccountBuilder);

return useMakeBitcoinNetworkSignersForPaymentType(
mainnetKeychain,
testnetKeychain,
regtestKeychain,
getNativeSegWitPaymentFromAddressIndex
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ export function useTaprootNetworkSigners() {
const {
mainnet: mainnetKeychain,
testnet: testnetKeychain,
regtest: regtestKeychain,
} = useSelector(selectTaprootAccountBuilder);
return useMakeBitcoinNetworkSignersForPaymentType(
mainnetKeychain,
testnetKeychain,
regtestKeychain,
getTaprootPaymentFromAddressIndex
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/shared/crypto/bitcoin/bitcoin.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { HDKey, Versions } from '@scure/bip32';
import * as btc from '@scure/btc-signer';

import { BitcoinNetworkModes, NetworkModes } from '@shared/constants';
import { defaultWalletKeyId, whenNetwork } from '@shared/utils';

import { defaultWalletKeyId } from '@shared/utils';
import { whenBitcoinNetwork } from '@app/common/utils';
import { DerivationPathDepth } from '../derivation-path.utils';
import { BtcSignerNetwork } from './bitcoin.network';
import { getTaprootPayment } from './p2tr-address-gen';
Expand Down Expand Up @@ -164,7 +164,7 @@ export function createWalletIdDecoratedPath(policy: string, walletId: string) {
// Primarily used to get the correct `Version` when passing Ledger Bitcoin
// extended public keys to the HDKey constructor
export function getHdKeyVersionsFromNetwork(network: BitcoinNetworkModes) {
return whenNetwork(network)({
return whenBitcoinNetwork(network)({
mainnet: undefined,
testnet: {
private: 0x00000000,
Expand Down

0 comments on commit 259b493

Please sign in to comment.