Skip to content

Commit

Permalink
chore: update nbtc to main
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 25, 2025
1 parent ffaff18 commit 1e69bc0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api/get-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ViewMethodsREFV1,
IShadowRecordInfo,
} from "../interfaces";
import { lpTokenPrefix } from "../utils/config";
import { lpTokenPrefix, NBTCTokenId } from "../utils/config";

export const getTokenContract = async (tokenContractAddress: string): Promise<Contract> => {
const { account } = await getBurrow();
Expand Down Expand Up @@ -47,7 +47,7 @@ const getBalance = async (
account_id: accountId,
},
)) as string;
if (tokenId == "nbtc.toalice.near") {
if (tokenId == NBTCTokenId) {
return Decimal.max(new Decimal(balanceInYocto || 0).minus(1000), "0").toFixed();
}
}
Expand Down
2 changes: 1 addition & 1 deletion hooks/useBtcBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function useBtcAction({
const [availableBalance, setAvailableBalance] = useState<number>(0);
const btcSelector = useBtcWalletSelector();
const isBtcTokenId = tokenId == NBTCTokenId;
const env = "private_mainnet";
const env = "mainnet";
useDebounce(
() => {
if (btcSelector?.account && isBtcTokenId) {
Expand Down
2 changes: 1 addition & 1 deletion store/actions/supply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function supply({
amount: expandedAmount.toFixed(0),
msg: useAsCollateral ? JSON.stringify({ Execute: collateralActions }) : "",
},
env: "private_mainnet",
env: "mainnet",
registerDeposit: "100000000000000000000000",
});
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion store/actions/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export async function withdraw({
);
withdraw_to_btc = await getWithdrawTransaction({
amount: withdrawAmount,
env: "private_mainnet",
env: "mainnet",
});
}
await prepareAndExecuteTransactions(transactions, isMeme, withdraw_to_btc);
Expand Down
2 changes: 1 addition & 1 deletion utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const incentiveTokens = [
export const topTokens = ["shadow_ref_v1-4179"];
export const NBTCTokenId = {
testnet: "nbtc-dev.testnet",
mainnet: "nbtc.toalice.near",
mainnet: "nbtc.bridge.near",
}[defaultNetwork];
export const MARGIN_WHITELIST = [
"lini.near",
Expand Down
2 changes: 1 addition & 1 deletion utils/wallet-selector-compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const getWalletSelector = async ({ onAccountChange }: GetWalletSelectorAr
} as any),
setupBTCWallet({
autoConnect: true,
env: "private_mainnet",
env: "mainnet",
}) as any,
myNearWallet,
setupOKXWallet({}),
Expand Down

0 comments on commit 1e69bc0

Please sign in to comment.