Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GA-ISSUE 299: [Pelagus] - Change all references of coinType and chainCode from value of 69 to 994 #306

Merged
merged 1 commit into from
Jun 3, 2024
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
1 change: 0 additions & 1 deletion .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions background/constants/base-assets.ts
Original file line number Diff line number Diff line change
@@ -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/",
Expand All @@ -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/",
Expand Down
7 changes: 3 additions & 4 deletions background/constants/coin-types.ts
Original file line number Diff line number Diff line change
@@ -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]
9 changes: 7 additions & 2 deletions background/tests/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
}
Expand Down
Loading