From 12024fbc250367ad1d0d5429d653e326d53f9530 Mon Sep 17 00:00:00 2001 From: Artem Burakov Date: Thu, 30 May 2024 16:12:25 +0300 Subject: [PATCH] GA-fix: changes all references of coinType and chainCode from value of 69 to 994 --- .env.defaults | 1 - background/constants/base-assets.ts | 6 +++--- background/constants/coin-types.ts | 7 +++---- background/tests/factories.ts | 9 +++++++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.env.defaults b/.env.defaults index a7da6fba..21343870 100644 --- a/.env.defaults +++ b/.env.defaults @@ -5,7 +5,6 @@ GAS_PRICE_POOLING_FREQUENCY=120 ETHEREUM_NETWORK=mainnet WEBSITE_ORIGIN=https://pelaguswallet.io MAINNET_FORK_URL="ws://mainnet-fork.tally.cash:2096/" -MAINNET_FORK_CHAIN_ID=69 FILE_DIRECTORY_IPFS_HASH="QmYwYkRdYMBCtMqbimgaXjf7UL4RUb5zBQu4TDE67oZbq5" PART_GLOSSARY_IPFS_HASH="bafybeibytsozn7qsvqgecogv5urg5en34r7v3zxo326vacumi56ckah5b4" USE_UPDATED_SIGNING_UI=true diff --git a/background/constants/base-assets.ts b/background/constants/base-assets.ts index e99db446..7035e37c 100644 --- a/background/constants/base-assets.ts +++ b/background/constants/base-assets.ts @@ -1,12 +1,12 @@ import { NetworkBaseAsset } from "../networks" -import { coinTypesByAssetSymbol } from "./coin-types" +import { COIN_TYPES_BY_ASSET_SYMBOL } from "./coin-types" export const QUAI: NetworkBaseAsset = { chainID: "9000", name: "Quai Network", symbol: "QUAI", decimals: 18, - coinType: coinTypesByAssetSymbol.QUAI, + coinType: COIN_TYPES_BY_ASSET_SYMBOL.QUAI, metadata: { tokenLists: [], websiteURL: "https://qu.ai/", @@ -17,7 +17,7 @@ export const QUAI_LOCAL: NetworkBaseAsset = { name: "Quai Network Local", symbol: "QUAI", decimals: 18, - coinType: coinTypesByAssetSymbol.QUAI, + coinType: COIN_TYPES_BY_ASSET_SYMBOL.QUAI, metadata: { tokenLists: [], websiteURL: "https://qu.ai/", diff --git a/background/constants/coin-types.ts b/background/constants/coin-types.ts index 663f3391..b8abfc9e 100644 --- a/background/constants/coin-types.ts +++ b/background/constants/coin-types.ts @@ -1,11 +1,10 @@ // This file includes SLIP-0044 data used by the extension. Because this is raw // data but is important, it SHOULD NOT be imported from an external package. -// Limited extension-specific list of coin types by asset symbol -export const coinTypesByAssetSymbol = { - QUAI: 69, +export const COIN_TYPES_BY_ASSET_SYMBOL = { + QUAI: 994, } as const // All coin types known to the extension export type Slip44CoinType = - typeof coinTypesByAssetSymbol[keyof typeof coinTypesByAssetSymbol] + typeof COIN_TYPES_BY_ASSET_SYMBOL[keyof typeof COIN_TYPES_BY_ASSET_SYMBOL] diff --git a/background/tests/factories.ts b/background/tests/factories.ts index 93d0bbdc..80225350 100644 --- a/background/tests/factories.ts +++ b/background/tests/factories.ts @@ -10,7 +10,12 @@ import { PricePoint, SmartContractFungibleAsset, } from "../assets" -import { QUAI, QUAI_NETWORK, USD } from "../constants" +import { + COIN_TYPES_BY_ASSET_SYMBOL, + QUAI, + QUAI_NETWORK, + USD, +} from "../constants" import { normalizeEVMAddress } from "../lib/utils" import { AnyEVMBlock, @@ -345,7 +350,7 @@ export const createNetworkBaseAsset = ( name: `${symbol} Network`, symbol, decimals: 18, - coinType: 69, + coinType: COIN_TYPES_BY_ASSET_SYMBOL.QUAI, chainID: "1", contractAddress: createRandom0xHash(), }