Skip to content

Commit

Permalink
change coingeckoId to tether for temporary fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
perfogic committed Sep 6, 2024
1 parent e3fc53a commit 9d41af2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/page/bridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,13 @@ const Bridge = () => {
};

const validatePrice = (token: TokenType, amount: number) => {
console.log(token?.coingeckoId);
const usdPrice = new BigDecimal(amount || 0)
.mul(prices?.[token?.coingeckoId] || 0)
.toNumber();
console.log({
usdPrice,
});

const minimumAmount =
Math.ceil((MINIMUM_BRIDGE_PER_USD * amount * 100) / usdPrice) / 100;
Expand Down
4 changes: 2 additions & 2 deletions constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const OraichainTokenList: TokenType[] = [
Icon: UsdcIcon,
contractAddress: USDC_CONTRACT,
denom: "usdc",
coingeckoId: "bridged-usd-coin-ton-bridge",
coingeckoId: "tether",
decimal: 6,
},
// {
Expand Down Expand Up @@ -98,7 +98,7 @@ export const TonTokenList = (network: Environment): TokenType[] => [
Icon: UsdcIcon,
contractAddress: TonTokensContract[network]?.jUSDC,
denom: "ton20_usdc",
coingeckoId: "bridged-usd-coin-ton-bridge",
coingeckoId: "tether",
decimal: 6,
},
// {
Expand Down

0 comments on commit 9d41af2

Please sign in to comment.