Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ylitvinov committed Nov 5, 2022
1 parent 21935c9 commit 0a796f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/http-examples/test_our_api.http
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### Swap on Uniswap
POST http://localhost:8000
POST https://firemask-metawall.herokuapp.com/
Content-Type: application/json

{
"transaction": "0x02f90218057f8459682f00845ca4f0ce8302816e9468b3465833fb72a70ecdf485e0e4c7bd8665fc4587049e57d6354000b901a45ae401dc000000000000000000000000000000000000000000000000000000006366030c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d60000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f98400000000000000000000000000000000000000000000000000000000000001f400000000000000000000000029ff2e635634a3c36932caeb45b1a8e9ccdb24b200000000000000000000000000000000000000000000000000049e57d63540000000000000000000000000000000000000000000000000000006985e317c6e04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c080a0414fd5efc88511ecbb60ee31131e3df76d5ae8fc7697205ccb5055c2e45bc9d2a0733200eb032c08984df59aa807cebf48110e5c44edb0fd82822aa06429f8ee08"
"transaction": "0x02f90332010d8459682f008503abc588598303a8389468b3465833fb72a70ecdf485e0e4c7bd8665fc4580b902c45ae401dc0000000000000000000000000000000000000000000000000000000063660d67000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000c4f3995c67000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000636611ff000000000000000000000000000000000000000000000000000000000000001b67ace7255204100447db7182b35df7c13633ba3764e19e99159f04198a4a864d623aafd6fd166b5548749d6fb3f13607a86200146be12465e610681a6fc589980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000006400000000000000000000000029ff2e635634a3c36932caeb45b1a8e9ccdb24b20000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000001c6b4cb2f490b2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c001a0adfe559f8474d1b16d9250416b11d59c3e58569f035af4bf222c2b0c6278e4e1a05e5a04d81d1574357e413e3a514dea7363cccd4f0c3b395d2cfefa9cf1643530"
}

### Token approval
Expand Down
6 changes: 3 additions & 3 deletions api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ app.post('/', async (req, res) => {
try {
let signedTransaction = req.body.transaction;
let result = await dryRunTransaction(signedTransaction);
res.send(result);
res.json(result);
} catch (e) {
console.log(e)
res.status(500).send(e);
res.status(500).json(e);
}
});
app.get('/', async (req, res) => {
res.send("Firemask Metawall - Metamask Firewall");
res.json({"Firemask Metawall": "Metamask Firewall"});
});

async function dryRunTransaction(serializedTransaction) {
Expand Down

0 comments on commit 0a796f3

Please sign in to comment.