Skip to content

Commit

Permalink
Merge pull request #6 from oraichain/feat/add_validation_on_minimum_b…
Browse files Browse the repository at this point in the history
…ridge

Feat/add validation on minimum bridge
  • Loading branch information
quangdz1704 authored Jul 19, 2024
2 parents 3212434 + 01ef2df commit 6599085
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/page/bridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ const Bridge = () => {
throw `The bridge contract does not have enough balance to process this bridge transaction. Wanted ${amount} ${token.symbol}, have ${balanceMax} ${token.symbol}`;
}

if (Number(amount) < 100) {
throw Error("Minimum bridge is 100 USDT");
}

const bridgeAdapterAddress = Address.parse(
TonInteractionContract[tonNetwork].bridgeAdapter
);
Expand Down Expand Up @@ -391,6 +395,10 @@ const Bridge = () => {
throw `The bridge contract does not have enough balance to process this bridge transaction. Wanted ${amount} ${token.symbol}, have ${displayBalance} ${token.symbol}`;
}

if (Number(amount) < 100) {
throw Error("Minimum bridge is 100 USDT");
}

const tonBridgeClient = new TonbridgeBridgeClient(
window.client,
oraiAddress,
Expand Down

0 comments on commit 6599085

Please sign in to comment.