Skip to content

Commit

Permalink
feat(hardhat): ensure WarpLink amount > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
xykota committed Oct 1, 2023
1 parent 532700b commit 592ec0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/hardhat/contracts/facets/WarpLink.sol
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,10 @@ contract WarpLink is IWarpLink, IStargateReceiver, WarpLinkCommandTypes {
amountOut
);

if (amountOut == 0) {
revert InsufficientOutputAmount();
}

// Deliver tokens
if (tokenOut == address(0)) {
payable(params.recipient).transfer(amountOut);
Expand Down

0 comments on commit 592ec0c

Please sign in to comment.