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 @@ -102,24 +102,24 @@
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/contracts": "workspace:^",
"@shapeshiftoss/errors": "workspace:^",
"@shapeshiftoss/hdwallet-coinbase": "1.62.18",
"@shapeshiftoss/hdwallet-core": "1.62.18",
"@shapeshiftoss/hdwallet-gridplus": "1.62.18",
"@shapeshiftoss/hdwallet-keepkey": "1.62.18",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.18",
"@shapeshiftoss/hdwallet-keplr": "1.62.18",
"@shapeshiftoss/hdwallet-ledger": "1.62.18",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.18",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.18",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.18",
"@shapeshiftoss/hdwallet-native": "1.62.18",
"@shapeshiftoss/hdwallet-native-vault": "1.62.18",
"@shapeshiftoss/hdwallet-phantom": "1.62.18",
"@shapeshiftoss/hdwallet-trezor": "1.62.18",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.18",
"@shapeshiftoss/hdwallet-vultisig": "1.62.18",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.18",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.18",
"@shapeshiftoss/hdwallet-coinbase": "1.62.19",
"@shapeshiftoss/hdwallet-core": "1.62.19",
"@shapeshiftoss/hdwallet-gridplus": "1.62.19",
"@shapeshiftoss/hdwallet-keepkey": "1.62.19",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.19",
"@shapeshiftoss/hdwallet-keplr": "1.62.19",
"@shapeshiftoss/hdwallet-ledger": "1.62.19",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.19",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.19",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.19",
"@shapeshiftoss/hdwallet-native": "1.62.19",
"@shapeshiftoss/hdwallet-native-vault": "1.62.19",
"@shapeshiftoss/hdwallet-phantom": "1.62.19",
"@shapeshiftoss/hdwallet-trezor": "1.62.19",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.19",
"@shapeshiftoss/hdwallet-vultisig": "1.62.19",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.19",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.19",
"@shapeshiftoss/swapper": "workspace:^",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions packages/caip/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export const ASSET_NAMESPACE = {
slip44: 'slip44',
splToken: 'token',
trc20: 'trc20',
trc10: 'trc10',
suiCoin: 'coin',
} as const

Expand Down
8 changes: 4 additions & 4 deletions packages/unchained-client/src/tron/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export class TronApi {

// Get TRC10 tokens from assetV2
if (data.assetV2) {
for (const [key, value] of Object.entries(data.assetV2)) {
data.assetV2.forEach(token => {
tokens.push({
contractAddress: key,
balance: String(value),
contractAddress: token.key,
balance: String(token.value),
})
}
})
}

// Get TRC20 tokens from TronGrid API
Expand Down
7 changes: 6 additions & 1 deletion packages/unchained-client/src/tron/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export interface TronTx {
signature?: string[]
}

type TRC20Token = {
key: string
value: number
}

export interface TronAccount {
address: string
balance: number
Expand All @@ -43,7 +48,7 @@ export interface TronAccount {
frozen_balance?: number
}
}
assetV2?: Record<string, number>
assetV2?: TRC20Token[]
}

export interface TronBlock {
Expand Down
2 changes: 2 additions & 0 deletions src/context/WalletProvider/Ledger/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
mayachainAssetId,
solAssetId,
thorchainAssetId,
tronAssetId,
} from '@shapeshiftoss/caip'
import { uniq } from 'lodash'

Expand All @@ -32,6 +33,7 @@ export const availableLedgerAppAssetIds = [
cosmosAssetId,
solAssetId,
mayachainAssetId,
tronAssetId,
]

export const availableLedgerAppChainIds = availableLedgerAppAssetIds.map(
Expand Down
Loading