Skip to content

Commit

Permalink
fixed: mint decimal issues
Browse files Browse the repository at this point in the history
  • Loading branch information
venuswhispers committed Jan 15, 2025
1 parent 4c8386f commit 0b16fbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/server/src/domain/swaps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Contract, formatEther, JsonRpcProvider, parseEther, Wallet } from "ethers"
import { Contract, formatEther, JsonRpcProvider, parseEther, parseUnits, Wallet } from "ethers"
import { TransactionType, swapStatusByIndex, SwapStatus, utilaTransactionStatusByIndex } from "@luxfi/core"

import { UTILA_NETWORKS } from "@/domain/constants"
Expand Down Expand Up @@ -648,7 +648,7 @@ export async function handlerUtilaPayoutAction(swapId: string) {
console.log(`>> Minting PayoutToken for this Swap [${swap.id}]`)

const contract = new Contract(swap.destination_asset.contract_address as string, ERC20B_ABI, wallet)
const txMint = await contract.bridgeMint(swap.destination_address, parseEther(String(swap.requested_amount)))
const txMint = await contract.bridgeMint(swap.destination_address, parseUnits(String(swap.requested_amount), swap?.destination_asset.decimals ?? 18))
await txMint.wait()
console.log(`>> Minted L/Z tokens ${txMint.hash}`)

Expand Down

0 comments on commit 0b16fbc

Please sign in to comment.