Skip to content

Commit 2d92290

Browse files
authored
fix: mf-6183 price of okb coin (#11937)
* fix: mf-6183 price of okb coin * fix: prettier --------- Co-authored-by: swkatmask <[email protected]>
1 parent b7c6b33 commit 2d92290

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

packages/mask/popups/pages/Wallet/components/WalletAssets/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Trans } from '@lingui/macro'
12
import { Icons } from '@masknet/icons'
23
import { RestorableScroll, UserAssetsProvider, useParamTab } from '@masknet/shared'
34
import { NetworkPluginID, PopupRoutes } from '@masknet/shared-base'
@@ -11,7 +12,6 @@ import { WalletAssetTabs } from '../../type.js'
1112
import { ActivityList } from '../ActivityList/index.js'
1213
import { AssetsList } from '../AssetsList/index.js'
1314
import { WalletCollections } from './WalletCollections.js'
14-
import { Trans } from '@lingui/macro'
1515

1616
const useStyles = makeStyles()((theme) => {
1717
const isDark = theme.palette.mode === 'dark'

packages/web3-constants/evm/coingecko.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"Moonriver": "moonriver",
3838
"Cronos": "crypto-com-chain",
3939
"BitTorrent": "bittorrent",
40-
"Boba": "boba-network"
40+
"Boba": "boba-network",
41+
"XLayer": "okb"
4142
}
4243
}

packages/web3-providers/src/Calendar/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export interface ProjectInfo {
32
links: Array<{
43
type: string

packages/web3-providers/src/Chainbase/apis/FungibleTokenAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ChainbaseFungibleTokenAPI implements FungibleTokenAPI.Provider<ChainId, Sc
6868
async getFungibleTokenPrice(chainId: ChainId, address: string) {
6969
if (isNativeTokenAddress(address) || !isValidAddress(address) || chainId !== ChainId.Mainnet) return undefined
7070
const data = await fetchFromChainbase<FT_Price>(
71-
urlcat('/v1/token/price', { chain_id: ChainId.Mainnet, contract_address: address }),
71+
urlcat('/v1/token/price', { chain_id: chainId, contract_address: address }),
7272
)
7373

7474
return data?.price

packages/web3-providers/src/DeBank/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const DEBANK_CHAIN_TO_CHAIN_ID_MAP: Record<DebankChains, ChainId | number
4040
movr: ChainId.Moonriver,
4141
nova: ChainId.Arbitrum_Nova,
4242
okt: ChainId.OKXChain,
43+
xlayer: ChainId.XLayer,
4344
op: ChainId.Optimism,
4445
palm: ChainId.Palm,
4546
pls: ChainId.Pulse,

packages/web3-providers/src/DeBank/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export enum DebankTransactionDirection {
66

77
/**
88
* Collect from https://docs.cloud.debank.com/en/readme/api-pro-reference/chain#returns-1
9+
* To get the full list: `curl https://debank-proxy.r2d2.to/v1/chain/list | jq ".[].id"`
910
*/
1011
export type DebankChains =
1112
| 'arb'
@@ -53,6 +54,7 @@ export type DebankChains =
5354
| 'tlos'
5455
| 'wan'
5556
| 'xdai'
57+
| 'xlayer'
5658

5759
export interface DictItem {
5860
name: string

0 commit comments

Comments
 (0)