diff --git a/.changeset/sour-mayflies-learn.md b/.changeset/sour-mayflies-learn.md new file mode 100644 index 000000000000..3a1bdee719eb --- /dev/null +++ b/.changeset/sour-mayflies-learn.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/cryptoassets": minor +--- + +Remove Misleading Casper Token Support in Cryptoassets Data diff --git a/libs/ledgerjs/packages/cryptoassets/src/data/casper.ts b/libs/ledgerjs/packages/cryptoassets/src/data/casper.ts deleted file mode 100644 index 6aabf1d1ad61..000000000000 --- a/libs/ledgerjs/packages/cryptoassets/src/data/casper.ts +++ /dev/null @@ -1,17 +0,0 @@ -export type CasperToken = [string, string, string, string, number, boolean]; - -const tokens: CasperToken[] = [ - // [assetCode, assetIssuer, asset type, name, precision, enableCountervalues] - // Note: asset type is only used in Receive asset message and always should be - // "Casper" - [ - "USDC", - "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN", - "Casper", - "USDC", - 7, - true, - ], -]; - -export default tokens; diff --git a/libs/ledgerjs/packages/cryptoassets/src/tokens.ts b/libs/ledgerjs/packages/cryptoassets/src/tokens.ts index 527e23420e05..d2a3ded69d71 100644 --- a/libs/ledgerjs/packages/cryptoassets/src/tokens.ts +++ b/libs/ledgerjs/packages/cryptoassets/src/tokens.ts @@ -6,7 +6,6 @@ import { tokens as sepoliaTokens } from "./data/evm/11155111"; import stellarTokens, { StellarToken } from "./data/stellar"; import vechainTokens, { Vip180Token } from "./data/vip180"; import esdttokens, { ElrondESDTToken } from "./data/esdt"; -import casperTokens, { CasperToken } from "./data/casper"; import asatokens, { AlgorandASAToken } from "./data/asa"; import { tokens as polygonTokens } from "./data/evm/137"; import trc10tokens, { TRC10Token } from "./data/trc10"; @@ -46,8 +45,6 @@ addTokens(esdttokens.map(convertElrondESDTTokens)); addTokens(cardanoNativeTokens.map(convertCardanoNativeTokens)); // Stellar tokens addTokens(stellarTokens.map(convertStellarTokens)); -// Casper tokens -addTokens(casperTokens.map(convertCasperTokens)); // VeChain tokens addTokens(vechainTokens.map(convertVechainToken)); // Ton tokens @@ -471,35 +468,6 @@ function convertStellarTokens([ }; } -function convertCasperTokens([ - assetCode, - assetIssuer, - assetType, - name, - precision, - enableCountervalues, -]: CasperToken): TokenCurrency { - const parentCurrency = getCryptoCurrencyById("casper"); - - return { - type: "TokenCurrency", - id: `casper/asset/${assetCode}:${assetIssuer}`, - contractAddress: assetIssuer, - parentCurrency, - tokenType: assetType, - name, - ticker: assetCode, - disableCountervalue: !enableCountervalues, - units: [ - { - name, - code: assetCode, - magnitude: precision, - }, - ], - }; -} - export function convertJettonToken([address, name, ticker, magnitude, delisted]: TonJettonToken): | TokenCurrency | undefined { diff --git a/libs/ledgerjs/packages/cryptoassets/src/types.ts b/libs/ledgerjs/packages/cryptoassets/src/types.ts index a801fb380ecf..a93507d163d3 100644 --- a/libs/ledgerjs/packages/cryptoassets/src/types.ts +++ b/libs/ledgerjs/packages/cryptoassets/src/types.ts @@ -2,7 +2,6 @@ export type { CardanoNativeToken } from "./data/cardanoNative"; export type { AlgorandASAToken } from "./data/asa"; export type { ElrondESDTToken } from "./data/esdt"; export type { StellarToken } from "./data/stellar"; -export type { CasperToken } from "./data/casper"; export type { TRC10Token } from "./data/trc10"; export type { TRC20Token } from "./data/trc20";