Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,24 @@
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/contracts": "workspace:^",
"@shapeshiftoss/errors": "workspace:^",
"@shapeshiftoss/hdwallet-coinbase": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-gridplus": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.30",
"@shapeshiftoss/hdwallet-keplr": "1.62.30",
"@shapeshiftoss/hdwallet-ledger": "1.62.30",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.30",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.30",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.30",
"@shapeshiftoss/hdwallet-native": "1.62.30",
"@shapeshiftoss/hdwallet-native-vault": "1.62.30",
"@shapeshiftoss/hdwallet-phantom": "1.62.30",
"@shapeshiftoss/hdwallet-trezor": "1.62.30",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.30",
"@shapeshiftoss/hdwallet-vultisig": "1.62.30",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.30",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.30",
"@shapeshiftoss/hdwallet-coinbase": "1.62.31",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-gridplus": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.31",
"@shapeshiftoss/hdwallet-keplr": "1.62.31",
"@shapeshiftoss/hdwallet-ledger": "1.62.31",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.31",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.31",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.31",
"@shapeshiftoss/hdwallet-native": "1.62.31",
"@shapeshiftoss/hdwallet-native-vault": "1.62.31",
"@shapeshiftoss/hdwallet-phantom": "1.62.31",
"@shapeshiftoss/hdwallet-trezor": "1.62.31",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.31",
"@shapeshiftoss/hdwallet-vultisig": "1.62.31",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.31",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.31",
"@shapeshiftoss/swapper": "workspace:^",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions packages/chain-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"dependencies": {
"@mysten/sui": "1.45.0",
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-ledger": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-ledger": "1.62.31",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
"@shapeshiftoss/utils": "workspace:^",
Expand Down
6 changes: 6 additions & 0 deletions packages/chain-adapters/src/error/ErrorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export const ErrorHandler = async (err: unknown, metadata?: ErrorMetadata): Prom
})
}

if ((err as Error).name === 'LedgerTronAllowDataDisabled') {
throw new ChainAdapterError(err, {
translation: 'chainAdapters.errors.ledgerTronAllowDataDisabled',
})
}

if (
err instanceof Error &&
err.message.includes('Remove inserted SafeCard to access internal GridPlus wallet')
Expand Down
2 changes: 1 addition & 1 deletion packages/swapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/contracts": "workspace:^",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
"@shapeshiftoss/utils": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2524,6 +2524,7 @@
"buildTransaction": "Failed to build transaction.",
"signTransaction": "Failed to sign transaction.",
"blindSigningRequired": "Transaction requires blind signing. Please enable Blind signing or Contract Data in your Ledger app settings and try again.",
"ledgerTronAllowDataDisabled": "Please enable Transactions Data in your Ledger TRON app settings and try again.",
"signAndBroadcastTransaction": "Failed to sign and broadcast transaction.",
"signMessage": "Failed to sign message.",
"broadcastTransaction": "Failed to broadcast transaction.",
Expand Down
10 changes: 9 additions & 1 deletion src/state/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { AssetId } from '@shapeshiftoss/caip'
import { fromAssetId } from '@shapeshiftoss/caip'
import { SwapperName } from '@shapeshiftoss/swapper'
import { KnownChainIds } from '@shapeshiftoss/types'

import type { FeatureFlags } from './slices/preferencesSlice/preferencesSlice'

Expand Down Expand Up @@ -57,6 +58,11 @@ export const getEnabledSwappers = (
const isGridPlusUtxoSell =
walletName === 'GridPlus' && sellAssetId && isUtxoChainId(fromAssetId(sellAssetId).chainId)

const isLedgerTronSell =
walletName === 'Ledger' &&
sellAssetId &&
fromAssetId(sellAssetId).chainId === KnownChainIds.TronMainnet

return {
[SwapperName.Thorchain]:
ThorSwap &&
Expand Down Expand Up @@ -94,7 +100,9 @@ export const getEnabledSwappers = (
[SwapperName.Cetus]:
CetusSwap && (!isCrossAccountTrade || isCrossAccountTradeSupported(SwapperName.Cetus)),
[SwapperName.Sunio]:
SunioSwap && (!isCrossAccountTrade || isCrossAccountTradeSupported(SwapperName.Sunio)),
SunioSwap &&
(!isCrossAccountTrade || isCrossAccountTradeSupported(SwapperName.Sunio)) &&
!isLedgerTronSell,
[SwapperName.Test]: false,
}
}
Loading