Skip to content

Commit

Permalink
fix: withdraw d issue
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 21, 2025
1 parent 6c72fa0 commit 86f8ce5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion store/actions/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
expandTokenDecimal,
registerAccountOnTokenWithQuery,
shrinkToken,
shrinkTokenDecimal,
} from "../helper";
import { ChangeMethodsLogic, ChangeMethodsOracle, ChangeMethodsToken } from "../../interfaces";
import { getTokenContract, prepareAndExecuteTransactions } from "../tokens";
Expand Down Expand Up @@ -162,7 +163,9 @@ export async function withdraw({ tokenId, extraDecimals, amount, isMax, isMeme }
const wallet = await selector.wallet();
let withdraw_to_btc;
if (wallet.id == "btc-wallet" && tokenId === NBTCTokenId) {
const withdrawAmount = shrinkToken(expandedAmount.toFixed(0), extraDecimals);
const withdrawAmount = shrinkTokenDecimal(expandedAmount.toFixed(0), extraDecimals).toFixed(
0,
);
withdraw_to_btc = await getWithdrawTransaction({
amount: withdrawAmount,
env: "private_mainnet",
Expand Down

0 comments on commit 86f8ce5

Please sign in to comment.