diff options
| author | Adam Soltys <[email protected]> | 2022-10-25 13:55:28 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-25 13:55:32 -0700 |
| commit | 2d7352ed9642ceea8beb32723191eb16d56830a6 (patch) | |
| tree | 0aef2e7bd3d82144708ee62f4d4a2f599f620db2 /routes/liquid | |
| parent | 6128d0ef6cd994807e6b30420be0874f1a8e94ef (diff) | |
| download | coinos-server-2d7352ed9642ceea8beb32723191eb16d56830a6.tar.gz coinos-server-2d7352ed9642ceea8beb32723191eb16d56830a6.zip | |
require pin on certain endpoints
Diffstat (limited to 'routes/liquid')
| -rw-r--r-- | routes/liquid/broadcast.js | 3 | ||||
| -rw-r--r-- | routes/liquid/send.js | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/routes/liquid/broadcast.js b/routes/liquid/broadcast.js index 03a71b2b..820c0be1 100644 --- a/routes/liquid/broadcast.js +++ b/routes/liquid/broadcast.js @@ -1,8 +1,11 @@ import { emit } from "$lib/sockets"; import store from "$lib/store"; +import { requirePin } from "$lib/utils"; export default async (req, res) => { try { + await requirePin(req); + const { user } = req; let hash = await lq.sendRawTransaction(req.body.tx); diff --git a/routes/liquid/send.js b/routes/liquid/send.js index d7a7c7b4..83b5d6ca 100644 --- a/routes/liquid/send.js +++ b/routes/liquid/send.js @@ -7,6 +7,7 @@ import config from "$config"; import { l, warn, err } from "$lib/logging"; import { liquidTx } from "$routes/liquid/fee"; import { Transaction } from 'liquidjs-lib'; +import { requirePin } from "$lib/utils"; import { computeConversionFee, @@ -263,6 +264,7 @@ export default async (req, res) => { let { user } = req; try { + await requirePin(req); let result = await sendLiquid({ ...req.body, user }) if (result instanceof Error) throw result; res.send(result); |
