Skip to content

Commit

Permalink
add stable pool config
Browse files Browse the repository at this point in the history
  • Loading branch information
xieqian committed Jan 21, 2024
1 parent bdb5734 commit 72cd9d3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 7 additions & 4 deletions screens/TokenDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { ConnectWalletButton } from "../../components/Header/WalletButton";
import { OuterLinkConfig } from "./config";
import { APYCell } from "../Market/APYCell";
import { RewardsV2 } from "../../components/Rewards";
import getConfig, { DEFAULT_POSITION, lpTokenPrefix } from "../../utils/config";
import getConfig, { DEFAULT_POSITION, lpTokenPrefix, STABLE_POOL_IDS } from "../../utils/config";
import InterestRateChart, { LabelText } from "./interestRateChart";
import TokenBorrowSuppliesChart from "./tokenBorrowSuppliesChart";
import { useTokenDetails } from "../../hooks/useTokenDetails";
Expand Down Expand Up @@ -1268,9 +1268,12 @@ function OuterLink() {
className="lg:opacity-60 lg:hover:opacity-100"
onClick={() => {
const pool_id = tokenId.split("-")[1];
// TODO need to judge is or not stable pool
window.open(`https://app.ref.finance/pool/${pool_id}`);
// window.open(`https://app.ref.finance/sauce/${pool_id}`);
const is_stable_pool = STABLE_POOL_IDS.includes(pool_id);
if (is_stable_pool) {
window.open(`https://app.ref.finance/sauce/${pool_id}`);
} else {
window.open(`https://app.ref.finance/pool/${pool_id}`);
}
}}
/>
</LabelOuterLinkIcon>
Expand Down
11 changes: 11 additions & 0 deletions utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ export const defaultNetwork = (process.env.NEXT_PUBLIC_DEFAULT_NETWORK ||

const META_TOKEN = { testnet: undefined, mainnet: "meta-token.near" };
const REF_TOKEN = { testnet: "ref.fakes.testnet", mainnet: "token.v2.ref-finance.near" };
export const STABLE_POOL_IDS = [
"4179",
"3514",
"3515",
"1910",
"3020",
"3364",
"3688",
"3433",
"3689",
];
export const DEFAULT_POSITION = "REGULAR";
export const BRRR_TOKEN = {
testnet: "test_brrr.1638481328.burrow.testnet",
Expand Down

0 comments on commit 72cd9d3

Please sign in to comment.