diff options
| author | Adam Soltys <[email protected]> | 2021-04-30 18:06:46 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-04-30 18:06:46 -0400 |
| commit | 01e85e75fa5c7de4b730d7dc440652a295703dba (patch) | |
| tree | 843803b67614251573d1b5d6b07d21b8e451324c /routes/liquid/send.js | |
| parent | 0351d70dd561ddf3bad4d716b4b01f77d3ac4a5e (diff) | |
| download | coinos-server-01e85e75fa5c7de4b730d7dc440652a295703dba.tar.gz coinos-server-01e85e75fa5c7de4b730d7dc440652a295703dba.zip | |
estimate fee during send if no tx provided
Diffstat (limited to 'routes/liquid/send.js')
| -rw-r--r-- | routes/liquid/send.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routes/liquid/send.js b/routes/liquid/send.js index ab28471e..a3bb7639 100644 --- a/routes/liquid/send.js +++ b/routes/liquid/send.js @@ -147,7 +147,12 @@ sendLiquid = async ({ user, address, memo, tx, limit }) => { module.exports = ah(async (req, res) => { let { user } = req; - let { address, memo, tx } = req.body; + let { address, feeRate, memo, tx } = req.body; + + if (!tx) { + ({ tx } = await liquidTx({ ...req.body, user })); + } + try { res.send(await sendLiquid({ user, address, memo, tx })); } catch (e) { |
