diff --git a/.env.base b/.env.base index af52f3cb4a0..b3712dd3c9f 100644 --- a/.env.base +++ b/.env.base @@ -43,6 +43,7 @@ REACT_APP_FEATURE_USDT_APPROVAL_RESET=true REACT_APP_FEATURE_PORTALS_SWAPPER=true REACT_APP_FEATURE_RUNEPOOL=true REACT_APP_FEATURE_MARKETS=false +REACT_APP_FEATURE_PHANTOM_WALLET=false # absolute URL prefix REACT_APP_ABSOLUTE_URL_PREFIX=https://app.shapeshift.com diff --git a/.env.dev b/.env.dev index 818d4a2b5df..2b5506cede2 100644 --- a/.env.dev +++ b/.env.dev @@ -56,3 +56,4 @@ REACT_APP_THORCHAIN_NODE_URL=https://dev-daemon.thorchain.shapeshift.com REACT_APP_MIDGARD_URL=https://dev-indexer.thorchain.shapeshift.com/v2 REACT_APP_FEATURE_MARKETS=true +REACT_APP_FEATURE_PHANTOM_WALLET=true diff --git a/.env.develop b/.env.develop index cdf541615e5..3d89e187356 100644 --- a/.env.develop +++ b/.env.develop @@ -52,3 +52,4 @@ REACT_APP_THORCHAIN_NODE_URL=https://dev-daemon.thorchain.shapeshift.com REACT_APP_MIDGARD_URL=https://dev-indexer.thorchain.shapeshift.com/v2 REACT_APP_FEATURE_MARKETS=true +REACT_APP_FEATURE_PHANTOM_WALLET=true diff --git a/package.json b/package.json index 89864a49ceb..d077e3e09e3 100644 --- a/package.json +++ b/package.json @@ -92,19 +92,20 @@ "@shapeshiftoss/caip": "workspace:^", "@shapeshiftoss/chain-adapters": "workspace:^", "@shapeshiftoss/errors": "workspace:^", - "@shapeshiftoss/hdwallet-coinbase": "1.55.5", - "@shapeshiftoss/hdwallet-core": "1.55.5", - "@shapeshiftoss/hdwallet-keepkey": "1.55.5", - "@shapeshiftoss/hdwallet-keepkey-webusb": "1.55.5", - "@shapeshiftoss/hdwallet-keplr": "1.55.5", - "@shapeshiftoss/hdwallet-ledger": "1.55.5", - "@shapeshiftoss/hdwallet-ledger-webusb": "1.55.5", - "@shapeshiftoss/hdwallet-metamask": "1.55.5", - "@shapeshiftoss/hdwallet-native": "1.55.5", - "@shapeshiftoss/hdwallet-native-vault": "1.55.5", - "@shapeshiftoss/hdwallet-shapeshift-multichain": "1.55.5", - "@shapeshiftoss/hdwallet-walletconnectv2": "1.55.5", - "@shapeshiftoss/hdwallet-xdefi": "1.55.5", + "@shapeshiftoss/hdwallet-coinbase": "1.55.9", + "@shapeshiftoss/hdwallet-core": "1.55.9", + "@shapeshiftoss/hdwallet-keepkey": "1.55.9", + "@shapeshiftoss/hdwallet-keepkey-webusb": "1.55.9", + "@shapeshiftoss/hdwallet-keplr": "1.55.9", + "@shapeshiftoss/hdwallet-ledger": "1.55.9", + "@shapeshiftoss/hdwallet-ledger-webusb": "1.55.9", + "@shapeshiftoss/hdwallet-metamask": "1.55.9", + "@shapeshiftoss/hdwallet-native": "1.55.9", + "@shapeshiftoss/hdwallet-native-vault": "1.55.9", + "@shapeshiftoss/hdwallet-phantom": "1.55.9", + "@shapeshiftoss/hdwallet-shapeshift-multichain": "1.55.9", + "@shapeshiftoss/hdwallet-walletconnectv2": "1.55.9", + "@shapeshiftoss/hdwallet-xdefi": "1.55.9", "@shapeshiftoss/swapper": "workspace:^", "@shapeshiftoss/types": "workspace:^", "@shapeshiftoss/unchained-client": "workspace:^", diff --git a/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts b/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts index c19c4f1d1e7..44e65a25e67 100644 --- a/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts +++ b/packages/chain-adapters/src/utxo/UtxoBaseAdapter.ts @@ -323,12 +323,12 @@ export abstract class UtxoBaseAdapter implements IChainAd const signTxInputs: BTCSignTxInput[] = [] for (const input of inputs) { - if (!input.path) continue - const data = await this.providers.http.getTransaction({ txid: input.txid }) signTxInputs.push({ - addressNList: bip32ToAddressNList(input.path), + addressNList: input.path + ? bip32ToAddressNList(input.path) + : toAddressNList({ ...bip44Params }), scriptType: accountTypeToScriptType[accountType], amount: String(input.value), vout: input.vout, diff --git a/src/assets/translations/en/main.json b/src/assets/translations/en/main.json index 4848a7a00fb..bb1977df905 100644 --- a/src/assets/translations/en/main.json +++ b/src/assets/translations/en/main.json @@ -1466,7 +1466,6 @@ "button": "Pair" }, "failure": { - "header": "Error", "body": "Unable to connect Keplr wallet" } }, @@ -1506,7 +1505,6 @@ "pairExistingDeviceBody": "Connecting a different Ledger device? Click 'Pair new device' to start fresh." }, "failure": { - "header": "Error", "body": "Unable to connect Ledger wallet" }, "connectWarning": "Before connecting a chain, make sure you have the app open on your device.", @@ -1524,7 +1522,6 @@ "button": "Pair" }, "failure": { - "header": "Error", "body": "Unable to connect MetaMask wallet" }, "redirect": { @@ -1533,6 +1530,18 @@ "button": "Open" } }, + "phantom": { + "errors": { + "unknown": "An unexpected error occurred communicating with Phantom", + "connectFailure": "Unable to connect Phantom wallet", + "multipleWallets": "Detected Ethereum provider is not Phantom. Do you have multiple wallets installed?" + }, + "connect": { + "header": "Pair Phantom", + "body": "Click Pair and login to Phantom from the popup window", + "button": "Pair" + } + }, "metaMaskSnap": { "title": "Multichain support is now available for MetaMask!", "subtitle": "Add the Multichain Snap on Metamask to send, receive, track, trade, and earn with the following chains:", @@ -1586,7 +1595,6 @@ "button": "Pair" }, "failure": { - "header": "Unable to connect Coinbase wallet", "body": "Unable to connect Coinbase wallet" } }, @@ -1601,7 +1609,6 @@ "button": "Pair" }, "failure": { - "header": "Error", "body": "Unable to connect WalletConnect wallet" } }, @@ -1617,7 +1624,6 @@ "button": "Pair" }, "failure": { - "header": "Error", "body": "Unable to connect XDEFI wallet" }, "redirect": { diff --git a/src/components/Icons/PhantomIcon.tsx b/src/components/Icons/PhantomIcon.tsx new file mode 100644 index 00000000000..71bda421618 --- /dev/null +++ b/src/components/Icons/PhantomIcon.tsx @@ -0,0 +1,20 @@ +import { createIcon } from '@chakra-ui/react' + +export const PhantomIcon = createIcon({ + displayName: 'PhantomIcon', + path: ( + + + + ), + viewBox: '0 0 593 493', +}) diff --git a/src/config.ts b/src/config.ts index a33be2a162a..577d4fbbb3c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -173,6 +173,7 @@ const validators = { REACT_APP_FEATURE_MARKETS: bool({ default: false }), REACT_APP_PORTALS_BASE_URL: url(), REACT_APP_ZERION_BASE_URL: url(), + REACT_APP_FEATURE_PHANTOM_WALLET: bool({ default: false }), } function reporter({ errors }: envalid.ReporterOptions) { diff --git a/src/context/WalletProvider/Coinbase/components/Failure.tsx b/src/context/WalletProvider/Coinbase/components/Failure.tsx index 1c97dce36fc..efa627684b9 100644 --- a/src/context/WalletProvider/Coinbase/components/Failure.tsx +++ b/src/context/WalletProvider/Coinbase/components/Failure.tsx @@ -3,7 +3,7 @@ import { FailureModal } from 'context/WalletProvider/components/FailureModal' export const CoinbaseFailure = () => { return ( ) diff --git a/src/context/WalletProvider/Keplr/components/Failure.tsx b/src/context/WalletProvider/Keplr/components/Failure.tsx index c90b090ae08..a3e10a4d89b 100644 --- a/src/context/WalletProvider/Keplr/components/Failure.tsx +++ b/src/context/WalletProvider/Keplr/components/Failure.tsx @@ -3,7 +3,7 @@ import { FailureModal } from 'context/WalletProvider/components/FailureModal' export const KeplrFailure = () => { return ( ) diff --git a/src/context/WalletProvider/KeyManager.ts b/src/context/WalletProvider/KeyManager.ts index db8dddf826d..f2c9a8895c8 100644 --- a/src/context/WalletProvider/KeyManager.ts +++ b/src/context/WalletProvider/KeyManager.ts @@ -3,6 +3,7 @@ export enum KeyManager { Native = 'native', KeepKey = 'keepkey', MetaMask = 'metamask', + Phantom = 'phantom', Demo = 'demo', XDefi = 'xdefi', Keplr = 'keplr', diff --git a/src/context/WalletProvider/Ledger/components/Failure.tsx b/src/context/WalletProvider/Ledger/components/Failure.tsx index bbb96c4e968..d3ed626c22e 100644 --- a/src/context/WalletProvider/Ledger/components/Failure.tsx +++ b/src/context/WalletProvider/Ledger/components/Failure.tsx @@ -3,7 +3,7 @@ import { FailureModal } from 'context/WalletProvider/components/FailureModal' export const LedgerFailure = () => { return ( ) diff --git a/src/context/WalletProvider/MetaMask/components/Failure.tsx b/src/context/WalletProvider/MetaMask/components/Failure.tsx index 4cc8c1908fc..e609ef36a87 100644 --- a/src/context/WalletProvider/MetaMask/components/Failure.tsx +++ b/src/context/WalletProvider/MetaMask/components/Failure.tsx @@ -2,9 +2,6 @@ import { FailureModal } from 'context/WalletProvider/components/FailureModal' export const MetaMaskFailure = () => { return ( - + ) } diff --git a/src/context/WalletProvider/Phantom/components/Connect.tsx b/src/context/WalletProvider/Phantom/components/Connect.tsx new file mode 100644 index 00000000000..e8866bb0b72 --- /dev/null +++ b/src/context/WalletProvider/Phantom/components/Connect.tsx @@ -0,0 +1,83 @@ +import React, { useCallback, useState } from 'react' +import type { RouteComponentProps } from 'react-router-dom' +import type { ActionTypes } from 'context/WalletProvider/actions' +import { WalletActions } from 'context/WalletProvider/actions' +import { KeyManager } from 'context/WalletProvider/KeyManager' +import { useLocalWallet } from 'context/WalletProvider/local-wallet' +import { removeAccountsAndChainListeners } from 'context/WalletProvider/WalletProvider' +import { useWallet } from 'hooks/useWallet/useWallet' + +import { ConnectModal } from '../../components/ConnectModal' +import type { LocationState } from '../../NativeWallet/types' +import { PhantomConfig } from '../config' + +export interface PhantomSetupProps + extends RouteComponentProps< + {}, + any, // history + LocationState + > { + dispatch: React.Dispatch +} + +export const PhantomConnect = ({ history }: PhantomSetupProps) => { + const { dispatch, getAdapter, onProviderChange } = useWallet() + const localWallet = useLocalWallet() + const [loading, setLoading] = useState(false) + const [error, setError] = useState(null) + + const setErrorLoading = useCallback((e: string | null) => { + setError(e) + setLoading(false) + }, []) + + const pairDevice = useCallback(async () => { + setError(null) + setLoading(true) + + const adapter = await getAdapter(KeyManager.Phantom) + if (adapter) { + try { + // Remove all provider event listeners from previously connected wallets + await removeAccountsAndChainListeners() + + const wallet = await adapter.pairDevice() + if (!wallet) { + setErrorLoading('walletProvider.errors.walletNotFound') + throw new Error('Call to hdwallet-phantom::pairDevice returned null or undefined') + } + + await onProviderChange(KeyManager.Phantom, wallet) + + const { name, icon } = PhantomConfig + const deviceId = await wallet.getDeviceID() + const isLocked = await wallet.isLocked() + await wallet.initialize() + dispatch({ + type: WalletActions.SET_WALLET, + payload: { wallet, name, icon, deviceId, connectedType: KeyManager.Phantom }, + }) + dispatch({ type: WalletActions.SET_IS_CONNECTED, payload: true }) + dispatch({ type: WalletActions.SET_IS_LOCKED, payload: isLocked }) + localWallet.setLocalWalletTypeAndDeviceId(KeyManager.Phantom, deviceId) + dispatch({ type: WalletActions.SET_WALLET_MODAL, payload: false }) + } catch (e: any) { + console.error(e, 'Phantom Connect: There was an error initializing the wallet') + setErrorLoading(e.message) + history.push('/phantom/failure') + } + } + setLoading(false) + }, [dispatch, getAdapter, history, localWallet, onProviderChange, setErrorLoading]) + + return ( + + ) +} diff --git a/src/context/WalletProvider/Phantom/components/Failure.tsx b/src/context/WalletProvider/Phantom/components/Failure.tsx new file mode 100644 index 00000000000..fccac086bd6 --- /dev/null +++ b/src/context/WalletProvider/Phantom/components/Failure.tsx @@ -0,0 +1,10 @@ +import { FailureModal } from 'context/WalletProvider/components/FailureModal' + +export const PhantomFailure = () => { + return ( + + ) +} diff --git a/src/context/WalletProvider/Phantom/config.ts b/src/context/WalletProvider/Phantom/config.ts new file mode 100644 index 00000000000..0f43576e4d1 --- /dev/null +++ b/src/context/WalletProvider/Phantom/config.ts @@ -0,0 +1,16 @@ +import type { PhantomAdapter } from '@shapeshiftoss/hdwallet-phantom' +import { PhantomIcon } from 'components/Icons/PhantomIcon' +import type { SupportedWalletInfo } from 'context/WalletProvider/config' + +type PhantomConfigType = Omit, 'routes'> + +export const PhantomConfig: PhantomConfigType = { + adapters: [ + { + loadAdapter: () => import('@shapeshiftoss/hdwallet-phantom').then(m => m.PhantomAdapter), + }, + ], + supportsMobile: 'browser', + icon: PhantomIcon, + name: 'Phantom', +} diff --git a/src/context/WalletProvider/SelectModal.tsx b/src/context/WalletProvider/SelectModal.tsx index 9e6dbbf8e62..c5e18a4371b 100644 --- a/src/context/WalletProvider/SelectModal.tsx +++ b/src/context/WalletProvider/SelectModal.tsx @@ -64,6 +64,9 @@ const WalletSelectItem = ({ const isCoinbaseEnabled = getConfig().REACT_APP_FEATURE_COINBASE_WALLET if (walletType === KeyManager.Coinbase && !isCoinbaseEnabled) return null + const isPhantomEnabled = getConfig().REACT_APP_FEATURE_PHANTOM_WALLET + if (walletType === KeyManager.Phantom && !isPhantomEnabled) return null + const isWalletConnectV2Enabled = getConfig().REACT_APP_FEATURE_WALLET_CONNECT_V2 if (walletType === KeyManager.WalletConnectV2 && !isWalletConnectV2Enabled) return null diff --git a/src/context/WalletProvider/WalletProvider.tsx b/src/context/WalletProvider/WalletProvider.tsx index 03ed1b25318..e086021cbe7 100644 --- a/src/context/WalletProvider/WalletProvider.tsx +++ b/src/context/WalletProvider/WalletProvider.tsx @@ -80,6 +80,7 @@ export type MetaMaskLikeProvider = BrowserProvider export type KeyManagerWithProvider = | KeyManager.XDefi | KeyManager.MetaMask + | KeyManager.Phantom | KeyManager.WalletConnectV2 | KeyManager.Coinbase @@ -133,6 +134,7 @@ export const isKeyManagerWithProvider = ( [ KeyManager.XDefi, KeyManager.MetaMask, + KeyManager.Phantom, KeyManager.WalletConnectV2, KeyManager.Coinbase, ].includes(keyManager), @@ -159,6 +161,9 @@ export const getMaybeProvider = async ( if (localWalletType === KeyManager.MetaMask) { return (await detectEthereumProvider()) as MetaMaskLikeProvider } + if (localWalletType === KeyManager.Phantom) { + return (globalThis as any).phantom?.ethereum as unknown as MetaMaskLikeProvider + } if (localWalletType === KeyManager.XDefi) { try { return globalThis?.xfi?.ethereum as unknown as MetaMaskLikeProvider @@ -637,6 +642,46 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }): JSX } dispatch({ type: WalletActions.SET_LOCAL_WALLET_LOADING, payload: false }) break + case KeyManager.Phantom: + // Get the adapter again in each switch case to narrow down the adapter type + const phantomAdapter = await getAdapter(localWalletType) + + if (phantomAdapter) { + currentAdapters[localWalletType] = phantomAdapter + dispatch({ type: WalletActions.SET_ADAPTERS, payload: currentAdapters }) + // Fixes issue with wallet `type` being null when the wallet is loaded from state + dispatch({ type: WalletActions.SET_CONNECTOR_TYPE, payload: localWalletType }) + } + + const localPhantomWallet = await phantomAdapter?.pairDevice() + // Set the provider again on refresh to ensure event handlers are properly set + await onProviderChange(KeyManager.Phantom, localPhantomWallet ?? null) + if (localPhantomWallet) { + const { name, icon } = SUPPORTED_WALLETS[KeyManager.Phantom] + try { + await localPhantomWallet.initialize() + const deviceId = await localPhantomWallet.getDeviceID() + dispatch({ + type: WalletActions.SET_WALLET, + payload: { + wallet: localPhantomWallet, + name, + icon, + deviceId, + connectedType: KeyManager.Phantom, + }, + }) + dispatch({ type: WalletActions.SET_IS_LOCKED, payload: false }) + dispatch({ type: WalletActions.SET_IS_CONNECTED, payload: true }) + } catch (e) { + disconnect() + } + } else { + disconnect() + } + dispatch({ type: WalletActions.SET_LOCAL_WALLET_LOADING, payload: false }) + break + case KeyManager.Coinbase: // Get the adapter again in each switch case to narrow down the adapter type const coinbaseAdapter = await getAdapter(localWalletType) @@ -819,14 +864,16 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }): JSX if (_isLocked) { dispatch({ type: WalletActions.SET_IS_LOCKED, payload: true }) - // Don't continue execution in case the wallet got locked, set it to locked and abort instead - return + } else { + // Either a chain change or a wallet unlock - ensure we set isLocked to false before continuing to avoid bad states + dispatch({ type: WalletActions.SET_IS_LOCKED, payload: false }) } - // Either a change change or a wallet unlock - ensure we set isLocked to false before continuing to avoid bad states - dispatch({ type: WalletActions.SET_IS_LOCKED, payload: false }) - const adapter = await getAdapter(localWalletType) + + // Re-pair - which in case of accounts changed means the user will be prompted to connect their current account if they didn't do so + // Note, this isn't guaranteed to work, not all wallets are the same, some (i.e MM) have this weird flow where connecting to an unconnected account + // from a connected account can only be done from the wallet itself and not programmatically const localWallet = await adapter?.pairDevice() if (!localWallet) return diff --git a/src/context/WalletProvider/XDEFI/components/Failure.tsx b/src/context/WalletProvider/XDEFI/components/Failure.tsx index 1d36059b6e2..3dd553b64bb 100644 --- a/src/context/WalletProvider/XDEFI/components/Failure.tsx +++ b/src/context/WalletProvider/XDEFI/components/Failure.tsx @@ -3,7 +3,7 @@ import { FailureModal } from 'context/WalletProvider/components/FailureModal' export const XDEFIFailure = () => { return ( ) diff --git a/src/context/WalletProvider/config.ts b/src/context/WalletProvider/config.ts index bb6f197f941..c65a2a49531 100644 --- a/src/context/WalletProvider/config.ts +++ b/src/context/WalletProvider/config.ts @@ -6,6 +6,7 @@ import type { KeplrAdapter } from '@shapeshiftoss/hdwallet-keplr' import type { WebUSBLedgerAdapter as LedgerAdapter } from '@shapeshiftoss/hdwallet-ledger-webusb' import type { MetaMaskAdapter } from '@shapeshiftoss/hdwallet-metamask' import type { NativeAdapter } from '@shapeshiftoss/hdwallet-native' +import type { PhantomAdapter } from '@shapeshiftoss/hdwallet-phantom' import type { MetaMaskAdapter as MetaMaskMultiChainAdapter } from '@shapeshiftoss/hdwallet-shapeshift-multichain' import type { WalletConnectV2Adapter } from '@shapeshiftoss/hdwallet-walletconnectv2' import type { XDEFIAdapter } from '@shapeshiftoss/hdwallet-xdefi' @@ -26,6 +27,7 @@ import { LedgerConfig } from './Ledger/config' import { MetaMaskConfig } from './MetaMask/config' import { MobileConfig } from './MobileWallet/config' import { NativeConfig } from './NativeWallet/config' +import { PhantomConfig } from './Phantom/config' import { KeepKeyRoutes } from './routes' import { NativeWalletRoutes } from './types' import { WalletConnectV2Config } from './WalletConnectV2/config' @@ -238,6 +240,18 @@ const MetaMaskFailure = lazy(() => default: MetaMaskFailure, })), ) + +const PhantomConnect = lazy(() => + import('./Phantom/components/Connect').then(({ PhantomConnect }) => ({ + default: PhantomConnect, + })), +) +const PhantomFailure = lazy(() => + import('./Phantom/components/Failure').then(({ PhantomFailure }) => ({ + default: PhantomFailure, + })), +) + const MetaMaskMenu = lazy(() => import('./MetaMask/components/MetaMaskMenu').then(({ MetaMaskMenu }) => ({ default: MetaMaskMenu, @@ -325,6 +339,7 @@ export type SupportedWalletInfoByKeyManager = { [KeyManager.KeepKey]: SupportedWalletInfo [KeyManager.Keplr]: SupportedWalletInfo [KeyManager.Ledger]: SupportedWalletInfo + [KeyManager.Phantom]: SupportedWalletInfo [KeyManager.MetaMask]: SupportedWalletInfo< typeof MetaMaskAdapter | typeof MetaMaskMultiChainAdapter > @@ -404,6 +419,14 @@ export const SUPPORTED_WALLETS: SupportedWalletInfoByKeyManager = { ], connectedMenuComponent: MetaMaskMenu, }, + [KeyManager.Phantom]: { + ...PhantomConfig, + routes: [ + { path: '/phantom/connect', component: PhantomConnect }, + { path: '/phantom/failure', component: PhantomFailure }, + ], + }, + [KeyManager.XDefi]: { ...XDEFIConfig, routes: [ diff --git a/src/context/WalletProvider/types.ts b/src/context/WalletProvider/types.ts index 68a84f6a1e4..21e6c5dd413 100644 --- a/src/context/WalletProvider/types.ts +++ b/src/context/WalletProvider/types.ts @@ -5,6 +5,7 @@ import type { KeplrAdapter } from '@shapeshiftoss/hdwallet-keplr' import type { WebUSBLedgerAdapter } from '@shapeshiftoss/hdwallet-ledger-webusb' import type { MetaMaskAdapter } from '@shapeshiftoss/hdwallet-metamask' import type { NativeAdapter } from '@shapeshiftoss/hdwallet-native' +import type { PhantomAdapter } from '@shapeshiftoss/hdwallet-phantom' import type { WalletConnectV2Adapter } from '@shapeshiftoss/hdwallet-walletconnectv2' import type { XDEFIAdapter } from '@shapeshiftoss/hdwallet-xdefi' @@ -19,6 +20,7 @@ export type AdaptersByKeyManager = { [KeyManager.Keplr]: KeplrAdapter [KeyManager.WalletConnectV2]: WalletConnectV2Adapter [KeyManager.MetaMask]: MetaMaskAdapter + [KeyManager.Phantom]: PhantomAdapter [KeyManager.Coinbase]: CoinbaseAdapter [KeyManager.XDefi]: XDEFIAdapter } diff --git a/src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts b/src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts index 60b8c59724c..d9a3b378c26 100644 --- a/src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts +++ b/src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts @@ -32,6 +32,7 @@ import { supportsPolygon, supportsThorchain, } from '@shapeshiftoss/hdwallet-core' +import { PhantomHDWallet } from '@shapeshiftoss/hdwallet-phantom' import { isMetaMask } from '@shapeshiftoss/hdwallet-shapeshift-multichain' import { useMemo } from 'react' import { useIsSnapInstalled } from 'hooks/useIsSnapInstalled/useIsSnapInstalled' @@ -78,10 +79,13 @@ export const walletSupportsChain = ({ switch (chainId) { case btcChainId: + return supportsBTC(wallet) case bchChainId: + return supportsBTC(wallet) && !(wallet instanceof PhantomHDWallet) case dogeChainId: + return supportsBTC(wallet) && !(wallet instanceof PhantomHDWallet) case ltcChainId: - return supportsBTC(wallet) + return supportsBTC(wallet) && !(wallet instanceof PhantomHDWallet) case ethChainId: return supportsETH(wallet) case avalancheChainId: diff --git a/src/lib/account/utxo.ts b/src/lib/account/utxo.ts index 3e51ac17725..b35357eafc8 100644 --- a/src/lib/account/utxo.ts +++ b/src/lib/account/utxo.ts @@ -1,6 +1,7 @@ import { toAccountId } from '@shapeshiftoss/caip' import { utxoAccountParams, utxoChainIds } from '@shapeshiftoss/chain-adapters' import { supportsBTC } from '@shapeshiftoss/hdwallet-core' +import { PhantomHDWallet } from '@shapeshiftoss/hdwallet-phantom' import { MetaMaskShapeShiftMultiChainHDWallet } from '@shapeshiftoss/hdwallet-shapeshift-multichain' import type { AccountMetadataById, UtxoChainId } from '@shapeshiftoss/types' import { UtxoAccountType } from '@shapeshiftoss/types' @@ -23,6 +24,10 @@ export const deriveUtxoAccountIdsAndMetadata: DeriveAccountIdsAndMetadata = asyn // MetaMask snaps adapter only supports legacy for BTC and LTC supportedAccountTypes = [UtxoAccountType.P2pkh] } + if (wallet instanceof PhantomHDWallet) { + // Phantom supposedly supports more script types, but only supports Segwit Native (bech32 addresses) for now + supportedAccountTypes = [UtxoAccountType.SegwitNative] + } for (const accountType of supportedAccountTypes) { const { xpub: pubkey } = await adapter.getPublicKey(wallet, accountNumber, accountType) diff --git a/src/lib/utils/thorchain/index.ts b/src/lib/utils/thorchain/index.ts index 93d48adaa97..5863afdddfc 100644 --- a/src/lib/utils/thorchain/index.ts +++ b/src/lib/utils/thorchain/index.ts @@ -197,9 +197,9 @@ export const getThorchainFromAddress = async ({ } } -const getAccountAddressesWithBalances = async ( - accountId: AccountId, -): Promise<{ address: string; balance: string }[]> => { +// Memoized on accountId, see lodash docs: +// "By default, the first argument provided to the memoized function is used as the map cache key." +export const getAccountAddresses = memoize(async (accountId: AccountId): Promise => { if (isUtxoAccountId(accountId)) { const { chainId, account: pubkey } = fromAccountId(accountId) const adapter = assertGetUtxoChainAdapter(chainId) @@ -210,23 +210,14 @@ const getAccountAddressesWithBalances = async ( if (!addresses) return [] - return addresses.map(({ pubkey, balance }) => { + return addresses.map(({ pubkey }) => { const address = pubkey.startsWith('bitcoincash') ? pubkey.replace('bitcoincash:', '') : pubkey - - return { address, balance } + return address }) } - // We don't need balances for chain others than UTXOs - return [{ address: fromAccountId(accountId).account, balance: '' }] -} - -// Memoized on accountId, see lodash docs: -// "By default, the first argument provided to the memoized function is used as the map cache key." -export const getAccountAddresses = memoize( - async (accountId: AccountId): Promise => - (await getAccountAddressesWithBalances(accountId)).map(({ address }) => address), -) + return [fromAccountId(accountId).account] +}) // A THOR Tx can either be: // - a RUNE MsgDeposit message type diff --git a/src/state/slices/portfolioSlice/utils/index.ts b/src/state/slices/portfolioSlice/utils/index.ts index 8f54b4e8fbb..7cb0b7909b8 100644 --- a/src/state/slices/portfolioSlice/utils/index.ts +++ b/src/state/slices/portfolioSlice/utils/index.ts @@ -40,7 +40,9 @@ import { supportsPolygon, supportsThorchain, } from '@shapeshiftoss/hdwallet-core' +import { PhantomHDWallet } from '@shapeshiftoss/hdwallet-phantom' import type { KnownChainIds, UtxoChainId } from '@shapeshiftoss/types' +import { bech32 } from 'bech32' import cloneDeep from 'lodash/cloneDeep' import maxBy from 'lodash/maxBy' import type { BigNumber } from 'lib/bignumber/bignumber' @@ -76,7 +78,9 @@ export const accountIdToLabel = (accountId: AccountId): string => { // TODO(0xdef1cafe): translations if (pubkey.startsWith('xpub')) return 'Legacy' if (pubkey.startsWith('ypub')) return 'Segwit' - if (pubkey.startsWith('zpub')) return 'Segwit Native' + // TODO(gomes): This assumes bc prefix *is* a SegWit Native address, but this will consider both bc1p (P2WPKH) and bc1q (taproot) as SegWit Native + // which is wrong, but fine for now as we don't support Taproot. + if (pubkey.startsWith('zpub') || bech32.decode(pubkey).prefix === 'bc') return 'Segwit Native' return '' case bchChainId: return 'Bitcoin Cash' @@ -301,10 +305,13 @@ export const isAssetSupportedByWallet = (assetId: AssetId, wallet: HDWallet): bo case baseChainId: return supportsBase(wallet) case btcChainId: + return supportsBTC(wallet) case ltcChainId: + return supportsBTC(wallet) && !(wallet instanceof PhantomHDWallet) case dogeChainId: + return supportsBTC(wallet) && !(wallet instanceof PhantomHDWallet) case bchChainId: - return supportsBTC(wallet) + return supportsBTC(wallet) && !(wallet instanceof PhantomHDWallet) case cosmosChainId: return supportsCosmos(wallet) case thorchainChainId: diff --git a/src/state/slices/preferencesSlice/preferencesSlice.ts b/src/state/slices/preferencesSlice/preferencesSlice.ts index e2b6fae452e..950c43ded37 100644 --- a/src/state/slices/preferencesSlice/preferencesSlice.ts +++ b/src/state/slices/preferencesSlice/preferencesSlice.ts @@ -63,6 +63,7 @@ export type FeatureFlags = { UsdtApprovalReset: boolean RunePool: boolean Markets: boolean + PhantomWallet: boolean } export type Flag = keyof FeatureFlags @@ -151,6 +152,7 @@ const initialState: Preferences = { UsdtApprovalReset: getConfig().REACT_APP_FEATURE_USDT_APPROVAL_RESET, RunePool: getConfig().REACT_APP_FEATURE_RUNEPOOL, Markets: getConfig().REACT_APP_FEATURE_MARKETS, + PhantomWallet: getConfig().REACT_APP_FEATURE_PHANTOM_WALLET, }, selectedLocale: simpleLocale(), balanceThreshold: '0', diff --git a/src/test/mocks/store.ts b/src/test/mocks/store.ts index 9db9c9e1bb9..100f8b98911 100644 --- a/src/test/mocks/store.ts +++ b/src/test/mocks/store.ts @@ -119,6 +119,7 @@ export const mockStore: ReduxState = { RunePool: false, Portals: false, Markets: false, + PhantomWallet: false, }, selectedLocale: 'en', balanceThreshold: '0', diff --git a/yarn.lock b/yarn.lock index 6ab1bdebaf9..7bd0bf1c8eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11267,15 +11267,15 @@ __metadata: languageName: node linkType: hard -"@shapeshiftoss/hdwallet-coinbase@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-coinbase@npm:1.55.5" +"@shapeshiftoss/hdwallet-coinbase@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-coinbase@npm:1.55.9" dependencies: "@coinbase/wallet-sdk": ^3.6.6 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 eth-rpc-errors: ^4.0.3 lodash: ^4.17.21 - checksum: b0cc86c98573b84a00763c60a01b5382b4e1aeb949b1dc234a52dc0ec21f1aeea4b20f1548d29c962a306bb908ebee9ae03da1450f912185a78bf9b3a8d82673 + checksum: 0d551f0e3a1b0787933aae756ecaca05e61b6a084fb000808ee2950ce44eeeebc45b95490ca370f06004b09784a1e14d4cf1ad574ad8502c7b4f0cba82ac9717 languageName: node linkType: hard @@ -11305,40 +11305,42 @@ __metadata: languageName: node linkType: hard -"@shapeshiftoss/hdwallet-core@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-core@npm:1.55.5" +"@shapeshiftoss/hdwallet-core@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-core@npm:1.55.9" dependencies: + "@shapeshiftoss/bitcoinjs-lib": 5.2.0-shapeshift.2 "@shapeshiftoss/proto-tx-builder": ^0.8.0 eip-712: ^1.0.0 + ethers: 5.7.2 eventemitter2: ^5.0.1 lodash: ^4.17.21 rxjs: ^6.4.0 type-assertions: ^1.1.0 - checksum: 55fbcb3d3d7aaed0efe195394fb7b955c261a54d232022541bbaaaf16ee89d97fba096c1f7b0d639c754bf4c9010a1f74f539185b207a38166dc2493f00625d4 + checksum: e441830860c07518a871513b98d45ac881e2d1a80384d5fbc780c61c181c0f9a0131811633a93096fd4c48581ff2e097351be9bb6078d0821f270d7af24b0849 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-keepkey-webusb@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-keepkey-webusb@npm:1.55.5" +"@shapeshiftoss/hdwallet-keepkey-webusb@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-keepkey-webusb@npm:1.55.9" dependencies: - "@shapeshiftoss/hdwallet-core": 1.55.5 - "@shapeshiftoss/hdwallet-keepkey": 1.55.5 - checksum: 5bb2d75355d2afd1260cfeaaf567e4d46edc7be89bab9ccf97bb30e1e2830f2e5116e626f14bc90add48a150b5f5e3c23b2ac1f82c0b1f210a947c11e9cd9c10 + "@shapeshiftoss/hdwallet-core": 1.55.9 + "@shapeshiftoss/hdwallet-keepkey": 1.55.9 + checksum: fcb35e56f78390f7f654328943b59dee0cbbdcb0e3a037e8f0359c787c1f4e2dcabc576da3a8e6a9aab199c9108b0d3f72a3bf1b18c53d86ed08f8ba97e7e06b languageName: node linkType: hard -"@shapeshiftoss/hdwallet-keepkey@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-keepkey@npm:1.55.5" +"@shapeshiftoss/hdwallet-keepkey@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-keepkey@npm:1.55.9" dependencies: "@ethereumjs/common": ^2.4.0 "@ethereumjs/tx": ^3.3.0 "@keepkey/device-protocol": ^7.12.2 "@metamask/eth-sig-util": ^7.0.0 "@shapeshiftoss/bitcoinjs-lib": 5.2.0-shapeshift.2 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 "@shapeshiftoss/proto-tx-builder": ^0.8.0 bignumber.js: ^9.0.1 bnb-javascript-sdk-nobroadcast: ^2.16.14 @@ -11350,27 +11352,27 @@ __metadata: p-lazy: ^3.1.0 semver: ^7.3.8 tiny-secp256k1: ^1.1.6 - checksum: 110fae50109de4fca11013c446205a7d9253db7a2527f35b2fd9b98cec881489006c0cdf7899561abaab653aaeafb33b395dfc5976f225fb814227f473d72611 + checksum: 7ea0164111c2bf4eb52067645ff3ee8ff0bcf05b95583b708dfb2f1aa4a07bee5bda5c1b0da7d4cc0abb20e4901998ba5ef78a9d1d99f687420378815a7f54c1 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-keplr@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-keplr@npm:1.55.5" +"@shapeshiftoss/hdwallet-keplr@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-keplr@npm:1.55.9" dependencies: "@shapeshiftoss/caip": 8.15.0 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 "@shapeshiftoss/proto-tx-builder": ^0.8.0 "@shapeshiftoss/types": 3.1.3 base64-js: ^1.5.1 lodash: ^4.17.21 - checksum: c292dd789879848a56ce936c19f8219623cfb51ec870b15bdd46638ccdabff90b1c1c103ec739a5dc86202541798792fd3086d93194bb6b7263c6a6ae7a11f34 + checksum: 6fc0e10a19d520da7935fae0d3d1b21177a7ede3eb5305143b5a5208e6c86ca4b50f19d9a21afed756e451b244c9cb5cfe44e0fb79ff9ab5ffbba43a0f6b7e91 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-ledger-webusb@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-ledger-webusb@npm:1.55.5" +"@shapeshiftoss/hdwallet-ledger-webusb@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-ledger-webusb@npm:1.55.9" dependencies: "@ledgerhq/hw-app-btc": ^10.4.1 "@ledgerhq/hw-app-eth": ^6.38.0 @@ -11378,23 +11380,23 @@ __metadata: "@ledgerhq/hw-transport-webusb": ^6.29.2 "@ledgerhq/live-common": ^21.8.2 "@ledgerhq/logs": ^6.10.1 - "@shapeshiftoss/hdwallet-core": 1.55.5 - "@shapeshiftoss/hdwallet-ledger": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 + "@shapeshiftoss/hdwallet-ledger": 1.55.9 "@types/w3c-web-usb": ^1.0.4 p-queue: ^7.4.1 - checksum: 1ad229a3fe53512b4dec4d045bdbe3848403ca7478964718af3293f9c318de65e58797685bf8c8d4f113bc0d487e057145edb637d218a39bfb759efb3796a361 + checksum: aac21bbf07075063da25675f942421093850d1db702323e8e431d514d9c3c243f9d358be552e356e6df82d42ee064a817b0b77fac9612c17abeef24e70e7ff01 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-ledger@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-ledger@npm:1.55.5" +"@shapeshiftoss/hdwallet-ledger@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-ledger@npm:1.55.9" dependencies: "@ethereumjs/common": ^2.4.0 "@ethereumjs/tx": ^3.3.0 "@ledgerhq/hw-app-cosmos": ^6.29.1 "@shapeshiftoss/bitcoinjs-lib": 5.2.0-shapeshift.2 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 base64-js: ^1.5.1 bchaddrjs: ^0.4.4 bitcoinjs-message: ^2.0.0 @@ -11402,28 +11404,28 @@ __metadata: ethereumjs-tx: 1.3.7 ethereumjs-util: ^6.1.0 lodash: ^4.17.21 - checksum: bc6a7d0c37b29d6de7a0994a8c80bdc578754614f760dcd6627fe99ada78f833163229f78446b6f765a17a81729b9633d029a19277995adb570bf6082a31ebf6 + checksum: 944b0277bb41aae5a8318b56f27285e36380cb6a536e4f23d0192a75930ee8c30b3bebbd01719bdf97a5c10fb603f22e1613df375680b4720275bc0ee1b9c41b languageName: node linkType: hard -"@shapeshiftoss/hdwallet-metamask@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-metamask@npm:1.55.5" +"@shapeshiftoss/hdwallet-metamask@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-metamask@npm:1.55.9" dependencies: "@metamask/detect-provider": ^1.2.0 "@metamask/onboarding": ^1.0.1 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 eth-rpc-errors: ^4.0.3 lodash: ^4.17.21 - checksum: 1e6788628c8a55a427c2c6cac4e9d57ffddd9f318acb14537f07368f1fb90f5f7545c5c0a208f6eb5d915f5e4cec7d188ad807d0a2aec98d895352d5d9706eea + checksum: 2a80175faddf0a4f07ffe85a900d5a2763dfc5f15f2012fd8f168d8d4d02b78f02418a272e4f0cf4e5220f3d8e65f289c980b65bfc7d1f7890428dfb61e0b4f2 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-native-vault@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-native-vault@npm:1.55.5" +"@shapeshiftoss/hdwallet-native-vault@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-native-vault@npm:1.55.9" dependencies: - "@shapeshiftoss/hdwallet-native": 1.55.5 + "@shapeshiftoss/hdwallet-native": 1.55.9 bip39: ^3.0.4 hash-wasm: ^4.11.0 idb-keyval: ^6.0.3 @@ -11432,17 +11434,17 @@ __metadata: type-assertions: ^1.1.0 uuid: ^8.3.2 web-encoding: ^1.1.0 - checksum: 81a9f4dc33d178f189e2302a86363b0ddf5f93680b494a72f823f95f258ada5411db1565af2a49b5260e11cd22557339c6062a9d1f621e09cd542b794c4c2299 + checksum: 1f378982fb3a5368093eb7e6f1221e1e628d7fc3055667d33546b6e31f36d4a9e1255f3d5c9bbf15e02c46b856d07984de408abe4f61ba95b3765c60bb5a0f97 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-native@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-native@npm:1.55.5" +"@shapeshiftoss/hdwallet-native@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-native@npm:1.55.9" dependencies: "@shapeshiftoss/bitcoinjs-lib": 5.2.0-shapeshift.2 "@shapeshiftoss/fiosdk": 1.2.1-shapeshift.6 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 "@shapeshiftoss/proto-tx-builder": ^0.8.0 "@zxing/text-encoding": ^0.9.0 bchaddrjs: ^0.4.9 @@ -11464,7 +11466,7 @@ __metadata: tendermint-tx-builder: ^1.0.9 tiny-secp256k1: ^1.1.6 web-encoding: ^1.1.0 - checksum: 9adc600879890520e3910241161cd4c2226e62ff36024bd002db247374a8ffeee395f01f1013e4b6c49115f6c20d199de48b14d216f6ff4696bff896209ac49b + checksum: a1e54cabc84fa28db420b20cde735a41720c43b14ccbf14108a519eaa637fee97caf48694ea95088eb801a05e1fc75b3d9ec8ccb56924426d822bcef8f810bd9 languageName: node linkType: hard @@ -11500,41 +11502,55 @@ __metadata: languageName: node linkType: hard -"@shapeshiftoss/hdwallet-shapeshift-multichain@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-shapeshift-multichain@npm:1.55.5" +"@shapeshiftoss/hdwallet-phantom@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-phantom@npm:1.55.9" + dependencies: + "@shapeshiftoss/bitcoinjs-lib": 5.2.0-shapeshift.2 + "@shapeshiftoss/hdwallet-core": 1.55.9 + base64-js: ^1.5.1 + bitcoinjs-message: ^2.0.0 + ethers: 5.7.2 + lodash: ^4.17.21 + checksum: db324c2ca0a79a6f499d7e7cbe4d8765849f75f9f5e4abcabd70752415036e4fdaaa75ee9b8d0c992df6cd612469357099f3f05ffb6e8d6df34d4fa5e79c32cf + languageName: node + linkType: hard + +"@shapeshiftoss/hdwallet-shapeshift-multichain@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-shapeshift-multichain@npm:1.55.9" dependencies: "@metamask/detect-provider": ^1.2.0 "@metamask/onboarding": ^1.0.1 "@shapeshiftoss/common-api": ^9.3.0 - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 "@shapeshiftoss/metamask-snaps-adapter": ^1.0.10 "@shapeshiftoss/metamask-snaps-types": ^1.0.10 eth-rpc-errors: ^4.0.3 lodash: ^4.17.21 - checksum: e2acd742fa36f6d7bc03da5aacf9977966e1cb380c92dbdf1b2cbd8cef80cd7574a049dd749a67b97ba0653100e589c127f14af3b9f88f54e3f3f8cf6c6c3328 + checksum: eb1b1cd8d0a6724a3218aa0bd009524d828c7ba214b1b52d610fee42685b9af6845bf13db19358b6b52ebe3e8aee13c3d06430c429e33f91a4b03e6b19d99d44 languageName: node linkType: hard -"@shapeshiftoss/hdwallet-walletconnectv2@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-walletconnectv2@npm:1.55.5" +"@shapeshiftoss/hdwallet-walletconnectv2@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-walletconnectv2@npm:1.55.9" dependencies: - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 "@walletconnect/ethereum-provider": ^2.10.1 "@walletconnect/modal": ^2.6.2 ethers: ^5.6.5 - checksum: c68731154ae93c64054b159de5f982de73f814f8e34bd80c73db0baf3d546d2e1f91d79c8658a07f18db5c82254e6ea1013ca9891245c01bf25e3c0f1b4828a6 + checksum: bcc771b5e9215f0ac0a2b234ff0400ad927aefc548def9156e18c400b384ec882a464af11d6a52ba0e84fff630b04541937570c98baf5c92b246f9184bc27b3a languageName: node linkType: hard -"@shapeshiftoss/hdwallet-xdefi@npm:1.55.5": - version: 1.55.5 - resolution: "@shapeshiftoss/hdwallet-xdefi@npm:1.55.5" +"@shapeshiftoss/hdwallet-xdefi@npm:1.55.9": + version: 1.55.9 + resolution: "@shapeshiftoss/hdwallet-xdefi@npm:1.55.9" dependencies: - "@shapeshiftoss/hdwallet-core": 1.55.5 + "@shapeshiftoss/hdwallet-core": 1.55.9 lodash: ^4.17.21 - checksum: 1f627c5868caf7c28d97b37d0498768a8e8800ce9c785d32d7a8c424bba905200c0a6a55c393e9cc6e6c1476fe6d4656bae86a1fbb6b02bdfeda6dad7b679521 + checksum: a1c22e0ce75484aef8a20311c1289c04ef18470b45c73da47f29ea019c017d645af0b3f7f76bf79b77c14f1f6b69fffd9373117e98c554d4215701c1349485c5 languageName: node linkType: hard @@ -11729,19 +11745,20 @@ __metadata: "@shapeshiftoss/caip": "workspace:^" "@shapeshiftoss/chain-adapters": "workspace:^" "@shapeshiftoss/errors": "workspace:^" - "@shapeshiftoss/hdwallet-coinbase": 1.55.5 - "@shapeshiftoss/hdwallet-core": 1.55.5 - "@shapeshiftoss/hdwallet-keepkey": 1.55.5 - "@shapeshiftoss/hdwallet-keepkey-webusb": 1.55.5 - "@shapeshiftoss/hdwallet-keplr": 1.55.5 - "@shapeshiftoss/hdwallet-ledger": 1.55.5 - "@shapeshiftoss/hdwallet-ledger-webusb": 1.55.5 - "@shapeshiftoss/hdwallet-metamask": 1.55.5 - "@shapeshiftoss/hdwallet-native": 1.55.5 - "@shapeshiftoss/hdwallet-native-vault": 1.55.5 - "@shapeshiftoss/hdwallet-shapeshift-multichain": 1.55.5 - "@shapeshiftoss/hdwallet-walletconnectv2": 1.55.5 - "@shapeshiftoss/hdwallet-xdefi": 1.55.5 + "@shapeshiftoss/hdwallet-coinbase": 1.55.9 + "@shapeshiftoss/hdwallet-core": 1.55.9 + "@shapeshiftoss/hdwallet-keepkey": 1.55.9 + "@shapeshiftoss/hdwallet-keepkey-webusb": 1.55.9 + "@shapeshiftoss/hdwallet-keplr": 1.55.9 + "@shapeshiftoss/hdwallet-ledger": 1.55.9 + "@shapeshiftoss/hdwallet-ledger-webusb": 1.55.9 + "@shapeshiftoss/hdwallet-metamask": 1.55.9 + "@shapeshiftoss/hdwallet-native": 1.55.9 + "@shapeshiftoss/hdwallet-native-vault": 1.55.9 + "@shapeshiftoss/hdwallet-phantom": 1.55.9 + "@shapeshiftoss/hdwallet-shapeshift-multichain": 1.55.9 + "@shapeshiftoss/hdwallet-walletconnectv2": 1.55.9 + "@shapeshiftoss/hdwallet-xdefi": 1.55.9 "@shapeshiftoss/swapper": "workspace:^" "@shapeshiftoss/types": "workspace:^" "@shapeshiftoss/unchained-client": "workspace:^"