Skip to content

Commit

Permalink
Merge pull request #22 from oraichain/feat/add-hmstr
Browse files Browse the repository at this point in the history
fix validate
  • Loading branch information
quangdz1704 authored Sep 27, 2024
2 parents d41f42d + 13e5c74 commit 266e6b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/page/bridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,10 @@ const Bridge = () => {

if (!token || !amount) throw "Not valid!";

console.log({ amount, deductNativeAmount });
if (Number(deductNativeAmount) < Number(amount))
if (
toDisplay(amountsTon?.[token.denom] || "0", token.decimal) <
Number(amount)
)
throw "Insufficient funds";

if (tonNetwork == "mainnet") {
Expand Down

0 comments on commit 266e6b0

Please sign in to comment.