Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 95f4b84

Browse files
committed
update create amm quote mint
1 parent acf34f7 commit 95f4b84

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

src/utils/market.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,29 @@ export async function getMarket(conn: any, marketAddress: string): Promise<any |
7070
} = market
7171
let coinOrPcInTokenFlag = false
7272

73-
for (const item of [
74-
TOKENS.USDT,
75-
TOKENS.USDC,
76-
TOKENS.RAY,
77-
TOKENS.WSOL,
78-
TOKENS.SRM,
79-
TOKENS.PAI,
80-
TOKENS.mSOL,
81-
TOKENS.stSOL
82-
]) {
83-
if (quoteMint?.toBase58() === item.mintAddress) {
73+
const tMint = [
74+
TOKENS.USDT.mintAddress,
75+
TOKENS.USDC.mintAddress,
76+
TOKENS.RAY.mintAddress,
77+
TOKENS.WSOL.mintAddress,
78+
TOKENS.SRM.mintAddress,
79+
TOKENS.PAI.mintAddress,
80+
TOKENS.mSOL.mintAddress,
81+
TOKENS.stSOL.mintAddress,
82+
'ANAxByE6G2WjFp7A4NqtWYXb3mgruyzZYg3spfxe6Lbo', // ANA ANA
83+
'NRVwhjBQiUPYtfDT5zRBVJajzFQHaBUNtC7SNVvqRFa', // NIRV NIRV
84+
'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' // USDH Hubble Stablecoin USDH
85+
]
86+
87+
for (const item of tMint) {
88+
if (quoteMint?.toBase58() === item) {
8489
coinOrPcInTokenFlag = true
8590
break
8691
}
8792
}
8893
if (!coinOrPcInTokenFlag) {
8994
throw new Error(
90-
'Only markets that contain USDC, USDT, SOL, RAY, SRM, PAI, mSOL or stSOL as the Quote Token are currently supported.'
95+
'Only markets that contain USDC, USDT, SOL, RAY, SRM, PAI, mSOL, stSOL, ANA, NIRV or USDH as the Quote Token are currently supported.'
9196
)
9297
}
9398
const asks: number[] = []

0 commit comments

Comments
 (0)