Skip to content

Commit

Permalink
Merge pull request #20 from Abracadabra-money/feature/magicusd0pp-pri…
Browse files Browse the repository at this point in the history
…nt-insufficient-swap-output

feat(magicusd0pp): Print insufficient swap output amount
  • Loading branch information
0xmDreamy authored Jan 5, 2025
2 parents 0b6f683 + d2a4049 commit 9fecbf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
| Stargate S\*USDT | [task](https://app.gelato.network/functions/task/0x37ab785e9a1200fb8bac63b431e36da085b177841b24aa0dfab0a4981122da0a:1) |
| GM Strategy Harvester | [task](https://app.gelato.network/functions/task/0x40d7aadde626b52e7df27bcab3f92c42faf3f137d50fc98dffc79d20c9119314:42161) |
| Reward Distributor | [task](https://app.gelato.network/functions/task/0x1b62e611e8e3d87ec8c7ced57230d341802c0ac6c611afb9a9fb4a3c53dc6ac1:42161) |
| MagicUSD0pp Handler | [task](https://app.gelato.network/functions/task/0x0e8f9611aaf09ab1b9920064774a44c4e872a161235b0ea7a03ebfb1188b8fe6:1) |
| MagicUSD0pp Handler | [task](https://app.gelato.network/functions/task/0x4f6f0ab644ac150f41867b511224dd116f582c07097d28ca05ef643c049b3c11:1) |
8 changes: 7 additions & 1 deletion web3-functions/magicusd0pp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@ Web3Function.onRun(
if (quote.netOutValue < minimumSwapUsd) {
return {
canExec: false,
message: "Insufficient swap output",
message: `Insufficient swap output: ${quote.netOutValue.toLocaleString(
"en-US",
{
style: "currency",
currency: "USD",
},
)}`,
};
}

Expand Down

0 comments on commit 9fecbf6

Please sign in to comment.