From 4d981384a3d97a777264186b96a15ca395a4544a Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Tue, 1 Nov 2022 12:00:16 -0700 Subject: [PATCH] devop: make currencyNameLong property --- packages/extension/src/providers/ethereum/networks/astr.ts | 1 + packages/extension/src/providers/ethereum/networks/bsc.ts | 1 + packages/extension/src/providers/ethereum/networks/canto.ts | 3 ++- packages/extension/src/providers/ethereum/networks/etc.ts | 1 + packages/extension/src/providers/ethereum/networks/eth.ts | 1 + .../extension/src/providers/ethereum/networks/goerli.ts | 1 + .../extension/src/providers/ethereum/networks/karura.ts | 1 + packages/extension/src/providers/ethereum/networks/kov.ts | 1 + packages/extension/src/providers/ethereum/networks/matic.ts | 1 + .../src/providers/ethereum/networks/moonbeam/index.ts | 1 + .../src/providers/ethereum/networks/moonriver/index.ts | 1 + packages/extension/src/providers/ethereum/networks/okc.ts | 1 + packages/extension/src/providers/ethereum/networks/op.ts | 2 +- packages/extension/src/providers/ethereum/networks/rin.ts | 1 + packages/extension/src/providers/ethereum/networks/rop.ts | 1 + packages/extension/src/providers/ethereum/networks/sdn.ts | 1 + .../extension/src/providers/ethereum/types/evm-network.ts | 4 ++-- .../libs/activity-handlers/providers/subscan/index.ts | 2 +- .../src/providers/polkadot/networks/acala/acala.ts | 1 + .../src/providers/polkadot/networks/acala/karura.ts | 1 + .../polkadot/networks/acala/libs/assetinfo-orml.ts | 2 +- .../src/providers/polkadot/networks/astar/astar.ts | 1 + .../src/providers/polkadot/networks/astar/libs/assetinfo.ts | 2 +- .../src/providers/polkadot/networks/astar/shiden.ts | 1 + .../src/providers/polkadot/networks/bifrost/kusama.ts | 1 + .../polkadot/networks/bifrost/libs/assetinfo-orml.ts | 2 +- .../src/providers/polkadot/networks/bifrost/polkadot.ts | 1 + .../extension/src/providers/polkadot/networks/kusama.ts | 1 + .../extension/src/providers/polkadot/networks/polkadot.ts | 1 + .../extension/src/providers/polkadot/networks/westend.ts | 1 + .../src/providers/polkadot/types/substrate-network.ts | 5 +++-- .../providers/polkadot/ui/custom-views/mappings/acala.ts | 2 +- .../polkadot/ui/custom-views/mappings/substrate.ts | 2 +- packages/extension/src/types/base-network.ts | 4 ++-- yarn.lock | 6 +++--- 35 files changed, 42 insertions(+), 17 deletions(-) diff --git a/packages/extension/src/providers/ethereum/networks/astr.ts b/packages/extension/src/providers/ethereum/networks/astr.ts index 6f79180d7..2478a618d 100644 --- a/packages/extension/src/providers/ethereum/networks/astr.ts +++ b/packages/extension/src/providers/ethereum/networks/astr.ts @@ -12,6 +12,7 @@ const astrOptions: EvmNetworkOptions = { chainID: "0x250", isTestNetwork: false, currencyName: "ASTR", + currencyNameLong: "Astar", node: "wss://astar.public.blastapi.io/", icon: require("./icons/astr.png"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/bsc.ts b/packages/extension/src/providers/ethereum/networks/bsc.ts index 4c3ed0dba..709be7266 100644 --- a/packages/extension/src/providers/ethereum/networks/bsc.ts +++ b/packages/extension/src/providers/ethereum/networks/bsc.ts @@ -13,6 +13,7 @@ const bscOptions: EvmNetworkOptions = { chainID: "0x38", isTestNetwork: false, currencyName: "BNB", + currencyNameLong: "Binance", node: "wss://nodes.mewapi.io/ws/bsc", icon: require("./icons/bsc.svg"), gradient: "#F0B90B", diff --git a/packages/extension/src/providers/ethereum/networks/canto.ts b/packages/extension/src/providers/ethereum/networks/canto.ts index e922fd8d8..da6ef2a59 100644 --- a/packages/extension/src/providers/ethereum/networks/canto.ts +++ b/packages/extension/src/providers/ethereum/networks/canto.ts @@ -9,9 +9,10 @@ const cantoOptions: EvmNetworkOptions = { homePage: "https://canto.io/", blockExplorerTX: "https://evm.explorer.canto.io/tx/[[txHash]]", blockExplorerAddr: "https://evm.explorer.canto.io/address/[[address]]", - chainID: 7700, + chainID: "0x1e14", isTestNetwork: false, currencyName: "CANTO", + currencyNameLong: "Canto", node: "https://canto.evm.chandrastation.com/", icon: require("./icons/canto.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/etc.ts b/packages/extension/src/providers/ethereum/networks/etc.ts index ea567ca8a..e060efe37 100644 --- a/packages/extension/src/providers/ethereum/networks/etc.ts +++ b/packages/extension/src/providers/ethereum/networks/etc.ts @@ -12,6 +12,7 @@ const etcOptions: EvmNetworkOptions = { chainID: "0x3d", isTestNetwork: false, currencyName: "ETC", + currencyNameLong: "Ethereum Classic", node: "wss://nodes.mewapi.io/ws/etc", icon: require("./icons/etc.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/eth.ts b/packages/extension/src/providers/ethereum/networks/eth.ts index e55de3269..29f8821bb 100644 --- a/packages/extension/src/providers/ethereum/networks/eth.ts +++ b/packages/extension/src/providers/ethereum/networks/eth.ts @@ -14,6 +14,7 @@ const ethOptions: EvmNetworkOptions = { chainID: "0x1", isTestNetwork: false, currencyName: "ETH", + currencyNameLong: "Ethereum", node: "wss://nodes.mewapi.io/ws/eth", icon: require("./icons/eth.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/goerli.ts b/packages/extension/src/providers/ethereum/networks/goerli.ts index f4f8594ab..b66ca0da0 100644 --- a/packages/extension/src/providers/ethereum/networks/goerli.ts +++ b/packages/extension/src/providers/ethereum/networks/goerli.ts @@ -12,6 +12,7 @@ const goerliOptions: EvmNetworkOptions = { chainID: "0x5", isTestNetwork: true, currencyName: "GöETH", + currencyNameLong: "Goerli", node: "wss://nodes.mewapi.io/ws/goerli", icon: require("./icons/eth.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/karura.ts b/packages/extension/src/providers/ethereum/networks/karura.ts index da747d3f6..b8d334971 100644 --- a/packages/extension/src/providers/ethereum/networks/karura.ts +++ b/packages/extension/src/providers/ethereum/networks/karura.ts @@ -12,6 +12,7 @@ const karuraOptions: EvmNetworkOptions = { chainID: "0x2ae", isTestNetwork: false, currencyName: "KAR", + currencyNameLong: "Karura", node: "wss://eth-rpc-karura.aca-api.network/ws", icon: require("./icons/karura-evm.svg"), gradient: "linear-gradient(330.21deg, #E40C5B -26.31%, #FF4C3B 88.17%)", diff --git a/packages/extension/src/providers/ethereum/networks/kov.ts b/packages/extension/src/providers/ethereum/networks/kov.ts index fb625b0f6..3d123379c 100644 --- a/packages/extension/src/providers/ethereum/networks/kov.ts +++ b/packages/extension/src/providers/ethereum/networks/kov.ts @@ -12,6 +12,7 @@ const kovOptions: EvmNetworkOptions = { chainID: "0x2a", isTestNetwork: true, currencyName: "KOV", + currencyNameLong: "Kovan", node: "wss://nodes.mewapi.io/ws/kovan", icon: require("./icons/eth.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/matic.ts b/packages/extension/src/providers/ethereum/networks/matic.ts index a49a3777e..b5b9e8858 100644 --- a/packages/extension/src/providers/ethereum/networks/matic.ts +++ b/packages/extension/src/providers/ethereum/networks/matic.ts @@ -14,6 +14,7 @@ const maticOptions: EvmNetworkOptions = { chainID: "0x89", isTestNetwork: false, currencyName: "MATIC", + currencyNameLong: "Polygon Matic", node: "wss://nodes.mewapi.io/ws/matic", icon: require("./icons/matic.svg"), gradient: "#7B3FE4", diff --git a/packages/extension/src/providers/ethereum/networks/moonbeam/index.ts b/packages/extension/src/providers/ethereum/networks/moonbeam/index.ts index c7bf5d111..355e37f8b 100644 --- a/packages/extension/src/providers/ethereum/networks/moonbeam/index.ts +++ b/packages/extension/src/providers/ethereum/networks/moonbeam/index.ts @@ -13,6 +13,7 @@ const moonbeamOptions: EvmNetworkOptions = { chainID: "0x504", isTestNetwork: false, currencyName: "GLMR", + currencyNameLong: "Moonbeam", node: "wss://wss.api.moonbeam.network/", icon: require("../icons/moonbeam.svg"), gradient: "#53CBC9", diff --git a/packages/extension/src/providers/ethereum/networks/moonriver/index.ts b/packages/extension/src/providers/ethereum/networks/moonriver/index.ts index 229f60e8f..13c2d8275 100644 --- a/packages/extension/src/providers/ethereum/networks/moonriver/index.ts +++ b/packages/extension/src/providers/ethereum/networks/moonriver/index.ts @@ -13,6 +13,7 @@ const moonriverOptions: EvmNetworkOptions = { chainID: "0x505", isTestNetwork: false, currencyName: "MOVR", + currencyNameLong: "Moonriver", node: "wss://wss.api.moonriver.moonbeam.network", icon: require("../icons/moonriver.svg"), gradient: "linear-gradient(180deg, #F2B705 0%, #53CBC8 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/okc.ts b/packages/extension/src/providers/ethereum/networks/okc.ts index 722daf1ce..211fc90f2 100644 --- a/packages/extension/src/providers/ethereum/networks/okc.ts +++ b/packages/extension/src/providers/ethereum/networks/okc.ts @@ -12,6 +12,7 @@ const okcOptions: EvmNetworkOptions = { chainID: "0x42", isTestNetwork: false, currencyName: "OKT", + currencyNameLong: "OKX Chain", node: "https://exchainrpc.okex.org", icon: require("./icons/okc.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/op.ts b/packages/extension/src/providers/ethereum/networks/op.ts index afc81ea07..7e6efed09 100644 --- a/packages/extension/src/providers/ethereum/networks/op.ts +++ b/packages/extension/src/providers/ethereum/networks/op.ts @@ -9,7 +9,7 @@ const opOptions: EvmNetworkOptions = { homePage: "https://www.optimism.io/", blockExplorerTX: "https://optimistic.etherscan.io/tx/[[txHash]]", blockExplorerAddr: "https://optimistic.etherscan.io/address/[[address]]", - chainID: 10, + chainID: "0xa", isTestNetwork: false, currencyName: "ETH", currencyNameLong: "Ethereum", diff --git a/packages/extension/src/providers/ethereum/networks/rin.ts b/packages/extension/src/providers/ethereum/networks/rin.ts index 73be26bb2..47a96dcf8 100644 --- a/packages/extension/src/providers/ethereum/networks/rin.ts +++ b/packages/extension/src/providers/ethereum/networks/rin.ts @@ -12,6 +12,7 @@ const rinOptions: EvmNetworkOptions = { chainID: "0x4", isTestNetwork: true, currencyName: "RIN", + currencyNameLong: "Rinkeby", node: "wss://nodes.mewapi.io/ws/rinkeby", icon: require("./icons/eth.svg"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/networks/rop.ts b/packages/extension/src/providers/ethereum/networks/rop.ts index 6e0a42597..bd64a3e4c 100644 --- a/packages/extension/src/providers/ethereum/networks/rop.ts +++ b/packages/extension/src/providers/ethereum/networks/rop.ts @@ -12,6 +12,7 @@ const ropOptions: EvmNetworkOptions = { chainID: "0x3", isTestNetwork: true, currencyName: "ROP", + currencyNameLong: "Ropsten", node: "wss://nodes.mewapi.io/ws/rop", icon: require("./icons/eth.svg"), basePath: "m/44'/1'/0'/0", diff --git a/packages/extension/src/providers/ethereum/networks/sdn.ts b/packages/extension/src/providers/ethereum/networks/sdn.ts index 505966540..b93445da9 100644 --- a/packages/extension/src/providers/ethereum/networks/sdn.ts +++ b/packages/extension/src/providers/ethereum/networks/sdn.ts @@ -12,6 +12,7 @@ const sdnOptions: EvmNetworkOptions = { chainID: "0x150", isTestNetwork: false, currencyName: "SDN", + currencyNameLong: "Shiden", node: "wss://shiden.public.blastapi.io", icon: require("./icons/sdn.png"), gradient: "linear-gradient(180deg, #C549FF 0%, #684CFF 100%)", diff --git a/packages/extension/src/providers/ethereum/types/evm-network.ts b/packages/extension/src/providers/ethereum/types/evm-network.ts index 021173db6..169162943 100644 --- a/packages/extension/src/providers/ethereum/types/evm-network.ts +++ b/packages/extension/src/providers/ethereum/types/evm-network.ts @@ -29,7 +29,7 @@ export interface EvmNetworkOptions { chainID: `0x${string}`; isTestNetwork: boolean; currencyName: string; - currencyNameLong?: string; + currencyNameLong: string; node: string; icon: string; gradient: string; @@ -132,7 +132,7 @@ export class EvmNetwork extends BaseNetwork { fromBase(balance, this.decimals) ).times(nativeMarketData?.current_price ?? 0); const nativeAsset: AssetsType = { - name: this.currencyNameLong ?? this.name_long, + name: this.currencyNameLong, symbol: this.currencyName, icon: this.icon, balance, diff --git a/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/index.ts b/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/index.ts index 3a2f31082..325b443e4 100644 --- a/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/index.ts +++ b/packages/extension/src/providers/polkadot/libs/activity-handlers/providers/subscan/index.ts @@ -54,7 +54,7 @@ export default async ( token: { decimals: network.decimals, icon: network.icon, - name: network.name_long, + name: network.currencyNameLong, symbol: activity.asset_symbol !== "" ? activity.asset_symbol diff --git a/packages/extension/src/providers/polkadot/networks/acala/acala.ts b/packages/extension/src/providers/polkadot/networks/acala/acala.ts index d04a9b788..4ebaa0017 100644 --- a/packages/extension/src/providers/polkadot/networks/acala/acala.ts +++ b/packages/extension/src/providers/polkadot/networks/acala/acala.ts @@ -17,6 +17,7 @@ const acalaOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://acala.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "ACA", + currencyNameLong: "Acala", icon: require("../icons/acala.svg"), decimals: 12, prefix: 12, diff --git a/packages/extension/src/providers/polkadot/networks/acala/karura.ts b/packages/extension/src/providers/polkadot/networks/acala/karura.ts index 40b355663..42be71096 100644 --- a/packages/extension/src/providers/polkadot/networks/acala/karura.ts +++ b/packages/extension/src/providers/polkadot/networks/acala/karura.ts @@ -16,6 +16,7 @@ const karuraOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://karura.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "KAR", + currencyNameLong: "Karura", icon: require("../icons/karura.svg"), decimals: 12, prefix: 8, diff --git a/packages/extension/src/providers/polkadot/networks/acala/libs/assetinfo-orml.ts b/packages/extension/src/providers/polkadot/networks/acala/libs/assetinfo-orml.ts index f7bbf59d8..7f72cd55f 100644 --- a/packages/extension/src/providers/polkadot/networks/acala/libs/assetinfo-orml.ts +++ b/packages/extension/src/providers/polkadot/networks/acala/libs/assetinfo-orml.ts @@ -130,7 +130,7 @@ export default async ( }); const nativeAsset = new SubstrateNativeToken({ - name: network.name_long, + name: network.currencyNameLong, symbol: network.name, decimals: network.decimals, existentialDeposit: network.existentialDeposit, diff --git a/packages/extension/src/providers/polkadot/networks/astar/astar.ts b/packages/extension/src/providers/polkadot/networks/astar/astar.ts index 9db8cc40f..bc6d1ce42 100644 --- a/packages/extension/src/providers/polkadot/networks/astar/astar.ts +++ b/packages/extension/src/providers/polkadot/networks/astar/astar.ts @@ -17,6 +17,7 @@ const astarOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://astar.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "ASTR", + currencyNameLong: "Astar", icon: require("../icons/astar.png"), decimals: 18, prefix: 5, diff --git a/packages/extension/src/providers/polkadot/networks/astar/libs/assetinfo.ts b/packages/extension/src/providers/polkadot/networks/astar/libs/assetinfo.ts index 8941d825c..73edbcbe9 100644 --- a/packages/extension/src/providers/polkadot/networks/astar/libs/assetinfo.ts +++ b/packages/extension/src/providers/polkadot/networks/astar/libs/assetinfo.ts @@ -106,7 +106,7 @@ export default async ( } const nativeAsset = new SubstrateNativeToken({ - name: network.name_long, + name: network.currencyNameLong, symbol: network.name, decimals: network.decimals, existentialDeposit: network.existentialDeposit, diff --git a/packages/extension/src/providers/polkadot/networks/astar/shiden.ts b/packages/extension/src/providers/polkadot/networks/astar/shiden.ts index 686d4da79..4b615082a 100644 --- a/packages/extension/src/providers/polkadot/networks/astar/shiden.ts +++ b/packages/extension/src/providers/polkadot/networks/astar/shiden.ts @@ -17,6 +17,7 @@ const shidenOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://shiden.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "SDN", + currencyNameLong: "Shiden", icon: require("../icons/shiden.png"), decimals: 18, prefix: 5, diff --git a/packages/extension/src/providers/polkadot/networks/bifrost/kusama.ts b/packages/extension/src/providers/polkadot/networks/bifrost/kusama.ts index 90ba4a83b..7751dab15 100644 --- a/packages/extension/src/providers/polkadot/networks/bifrost/kusama.ts +++ b/packages/extension/src/providers/polkadot/networks/bifrost/kusama.ts @@ -17,6 +17,7 @@ const bifrostKusamaOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://bifrost-kusama.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "BNC", + currencyNameLong: "Kusama Bifrost", icon: require("../icons/bifrost.svg"), decimals: 12, prefix: 6, diff --git a/packages/extension/src/providers/polkadot/networks/bifrost/libs/assetinfo-orml.ts b/packages/extension/src/providers/polkadot/networks/bifrost/libs/assetinfo-orml.ts index cdcdb38f7..6dc9a8148 100644 --- a/packages/extension/src/providers/polkadot/networks/bifrost/libs/assetinfo-orml.ts +++ b/packages/extension/src/providers/polkadot/networks/bifrost/libs/assetinfo-orml.ts @@ -130,7 +130,7 @@ export default async ( }); const nativeAsset = new SubstrateNativeToken({ - name: network.name_long, + name: network.currencyNameLong, symbol: network.name, decimals: network.decimals, existentialDeposit: network.existentialDeposit, diff --git a/packages/extension/src/providers/polkadot/networks/bifrost/polkadot.ts b/packages/extension/src/providers/polkadot/networks/bifrost/polkadot.ts index 0654e234c..4984c8d2e 100644 --- a/packages/extension/src/providers/polkadot/networks/bifrost/polkadot.ts +++ b/packages/extension/src/providers/polkadot/networks/bifrost/polkadot.ts @@ -17,6 +17,7 @@ const bifrostPolkadotOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://bifrost.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "BNC", + currencyNameLong: "Bifrost", icon: require("../icons/bifrost.svg"), decimals: 12, prefix: 6, diff --git a/packages/extension/src/providers/polkadot/networks/kusama.ts b/packages/extension/src/providers/polkadot/networks/kusama.ts index 1279f5118..40b4424a7 100644 --- a/packages/extension/src/providers/polkadot/networks/kusama.ts +++ b/packages/extension/src/providers/polkadot/networks/kusama.ts @@ -15,6 +15,7 @@ const ksmOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://kusama.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "KSM", + currencyNameLong: "Kusama", icon: require("./icons/kusama.svg"), decimals: 12, prefix: 2, diff --git a/packages/extension/src/providers/polkadot/networks/polkadot.ts b/packages/extension/src/providers/polkadot/networks/polkadot.ts index 28ef04547..e24b8da74 100644 --- a/packages/extension/src/providers/polkadot/networks/polkadot.ts +++ b/packages/extension/src/providers/polkadot/networks/polkadot.ts @@ -15,6 +15,7 @@ const polkadotOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://polkadot.subscan.io/account/[[address]]", isTestNetwork: false, currencyName: "DOT", + currencyNameLong: "Polkadot", icon: require("./icons/polkadot.svg"), decimals: 10, prefix: 0, diff --git a/packages/extension/src/providers/polkadot/networks/westend.ts b/packages/extension/src/providers/polkadot/networks/westend.ts index 9c7b93538..51ef1b9f6 100644 --- a/packages/extension/src/providers/polkadot/networks/westend.ts +++ b/packages/extension/src/providers/polkadot/networks/westend.ts @@ -15,6 +15,7 @@ const wndOptions: SubstrateNetworkOptions = { blockExplorerAddr: "https://westend.subscan.io/extrinsic/[[address]]", isTestNetwork: true, currencyName: "WND", + currencyNameLong: "Westend", icon: require("./icons/westend.svg"), decimals: 12, prefix: 42, diff --git a/packages/extension/src/providers/polkadot/types/substrate-network.ts b/packages/extension/src/providers/polkadot/types/substrate-network.ts index 8adaa4358..e37c9d2a8 100644 --- a/packages/extension/src/providers/polkadot/types/substrate-network.ts +++ b/packages/extension/src/providers/polkadot/types/substrate-network.ts @@ -28,6 +28,7 @@ export interface SubstrateNetworkOptions { blockExplorerAddr: string; isTestNetwork: boolean; currencyName: string; + currencyNameLong: string; icon: string; decimals: number; prefix: number; @@ -105,7 +106,7 @@ export class SubstrateNetwork extends BaseNetwork { return Promise.resolve(this.assets); } else { const nativeToken = new SubstrateNativeToken({ - name: this.name_long, + name: this.currencyNameLong, symbol: this.name, coingeckoID: this.coingeckoID, decimals: this.decimals, @@ -124,7 +125,7 @@ export class SubstrateNetwork extends BaseNetwork { if (supported.length === 0) { const nativeToken = new SubstrateNativeToken({ - name: this.name_long, + name: this.currencyNameLong, symbol: this.name, coingeckoID: this.coingeckoID, decimals: this.decimals, diff --git a/packages/extension/src/providers/polkadot/ui/custom-views/mappings/acala.ts b/packages/extension/src/providers/polkadot/ui/custom-views/mappings/acala.ts index d78db0a5c..63896668d 100644 --- a/packages/extension/src/providers/polkadot/ui/custom-views/mappings/acala.ts +++ b/packages/extension/src/providers/polkadot/ui/custom-views/mappings/acala.ts @@ -57,7 +57,7 @@ const transferNativeCurrency = ( const token = new SubstrateNativeToken({ decimals: network.decimals, icon: network.icon, - name: network.name_long, + name: network.currencyNameLong, symbol: network.name, }); const rawAmount: string | null = args.amount ?? null; diff --git a/packages/extension/src/providers/polkadot/ui/custom-views/mappings/substrate.ts b/packages/extension/src/providers/polkadot/ui/custom-views/mappings/substrate.ts index 9e060cf8d..89670a10d 100644 --- a/packages/extension/src/providers/polkadot/ui/custom-views/mappings/substrate.ts +++ b/packages/extension/src/providers/polkadot/ui/custom-views/mappings/substrate.ts @@ -5,7 +5,7 @@ import { polkadotEncodeAddress } from "@enkryptcom/utils"; export const nativeTransfer = (network: SubstrateNetwork, data: any) => { const to = polkadotEncodeAddress(data.dest["Id"], network.prefix); const token = new SubstrateNativeToken({ - name: network.name_long, + name: network.currencyNameLong, symbol: network.name, coingeckoID: network.coingeckoID, decimals: network.decimals, diff --git a/packages/extension/src/types/base-network.ts b/packages/extension/src/types/base-network.ts index de4e2aee5..510f8adb2 100644 --- a/packages/extension/src/types/base-network.ts +++ b/packages/extension/src/types/base-network.ts @@ -14,7 +14,7 @@ export interface BaseNetworkOptions { blockExplorerAddr: string; isTestNetwork: boolean; currencyName: string; - currencyNameLong?: string; + currencyNameLong: string; icon: string; decimals: number; signer: SignerType[]; @@ -74,7 +74,7 @@ export abstract class BaseNetwork { this.api = options.api; this.customTokens = options.customTokens ?? false; this.coingeckoPlatform = options.coingeckoPlatform; - this.currencyNameLong = options.currencyNameLong ?? options.name_long; + this.currencyNameLong = options.currencyNameLong; } public abstract getAllTokens(address: string): Promise; diff --git a/yarn.lock b/yarn.lock index 30908630a..fb8984d2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10517,9 +10517,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001317": - version: 1.0.30001332 - resolution: "caniuse-lite@npm:1.0.30001332" - checksum: e54182ea42ab3d2ff1440f9a6480292f7ab23c00c188df7ad65586312e4da567e8bedd5cb5fb8f0ff4193dc027a54e17e0b3c0b6db5d5a3fb61c7726ff9c45b3 + version: 1.0.30001429 + resolution: "caniuse-lite@npm:1.0.30001429" + checksum: d1658080248ef5ef0f5157423b2766026e6aa45642ce3b2cc74859b6a54e39881dd902397a2368324ed30ed0cd40250f11a4a4f3773453cd57b88db5e5e5c76a languageName: node linkType: hard