diff options
| author | Adam Soltys <[email protected]> | 2022-09-02 15:06:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-02 15:06:43 -0700 |
| commit | d1cc66d1a02b75f90fbf0c05910777c76228259a (patch) | |
| tree | 7b93dc6a2fc0ec9d03676d6b4093fedf9733f128 /routes/bitcoin/sweep.js | |
| parent | 3161dd7ee95b6c7d70f8341298dd4fab84cda8b0 (diff) | |
| download | coinos-server-d1cc66d1a02b75f90fbf0c05910777c76228259a.tar.gz coinos-server-d1cc66d1a02b75f90fbf0c05910777c76228259a.zip | |
es6 migration
Diffstat (limited to 'routes/bitcoin/sweep.js')
| -rw-r--r-- | routes/bitcoin/sweep.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routes/bitcoin/sweep.js b/routes/bitcoin/sweep.js index 6c0ca580..eecfebe4 100644 --- a/routes/bitcoin/sweep.js +++ b/routes/bitcoin/sweep.js @@ -16,7 +16,7 @@ export default async (req, res) => { let utxos; if (!feeRate) feeRate = (await bc.estimateSmartFee(6)).feerate * SATS; feeRate = Math.round(feeRate / 1000); - l.info("sweeping", req.user.username, from, amount, feeRate); + l("sweeping", req.user.username, from, amount, feeRate); try { let { @@ -32,7 +32,7 @@ export default async (req, res) => { ({ data: utxos } = await axios.get(`${api}/address/${from}/utxo`)); console.log("got utxos", utxos); } catch (e) { - l.error("problem fetching utxos", e.message); + err("problem fetching utxos", e.message); } let targets = [ @@ -47,7 +47,7 @@ export default async (req, res) => { if (balance === amount) { delete targets[0].value; ({ inputs, outputs, fee } = split(utxos, targets, feeRate)); - l.info("split", inputs, outputs, fee); + l("split", inputs, outputs, fee); } if (!inputs || !outputs) @@ -82,6 +82,6 @@ export default async (req, res) => { if (balance !== amount) total = 0; res.send({ feeRate, psbt, total }); } catch (e) { - l.error("problem getting address stats", from, e.message); + err("problem getting address stats", from, e.message); } }; |
