diff options
| author | Adam Soltys <[email protected]> | 2022-09-02 11:02:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-02 11:02:06 -0700 |
| commit | 7a8d64833de8873afb92982b3f5bfff59b30c542 (patch) | |
| tree | bc92e20c7d5127d3b6b17f7b8d3190e08579f49e /routes/lightning | |
| parent | b06e117af96a38b163384f6a343f1de7c8996724 (diff) | |
| download | coinos-server-7a8d64833de8873afb92982b3f5bfff59b30c542.tar.gz coinos-server-7a8d64833de8873afb92982b3f5bfff59b30c542.zip | |
es6 migration
Diffstat (limited to 'routes/lightning')
| -rw-r--r-- | routes/lightning/channel.js | 4 | ||||
| -rw-r--r-- | routes/lightning/channelRequest.js | 2 | ||||
| -rw-r--r-- | routes/lightning/invoice.js | 2 | ||||
| -rw-r--r-- | routes/lightning/query.js | 2 | ||||
| -rw-r--r-- | routes/lightning/receive.js | 2 | ||||
| -rw-r--r-- | routes/lightning/send.js | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/routes/lightning/channel.js b/routes/lightning/channel.js index cb8ddf07..fe6d9520 100644 --- a/routes/lightning/channel.js +++ b/routes/lightning/channel.js @@ -1,6 +1,6 @@ -const axios = require("axios"); +import axios from 'axios'; -module.exports = ah(async (req, res) => { +export default ah(async (req, res) => { const { params } = req.body; const [pubkey, host] = params.uri.split("@"); diff --git a/routes/lightning/channelRequest.js b/routes/lightning/channelRequest.js index 169de654..96b6d71f 100644 --- a/routes/lightning/channelRequest.js +++ b/routes/lightning/channelRequest.js @@ -1,4 +1,4 @@ -module.exports = ah(async (req, res) => { +export default ah(async (req, res) => { let { localAmt, pushAmt } = req.body; pushAmt = 0; diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 31f23bd6..38bad042 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -1,5 +1,5 @@ -module.exports = ah(async (req, res) => { +export default ah(async (req, res) => { let { amount, memo, tip } = req.body; if (!tip) tip = 0; let value = amount + tip; diff --git a/routes/lightning/query.js b/routes/lightning/query.js index dc867371..0d034604 100644 --- a/routes/lightning/query.js +++ b/routes/lightning/query.js @@ -1,4 +1,4 @@ -module.exports = ah(async (req, res) => { +export default ah(async (req, res) => { const { payreq } = req.body; const invoice = await db.Invoice.findOne({ diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index c9e7dec7..1c3dc8eb 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -1,4 +1,4 @@ -const { computeConversionFee } = require('./conversionFee.js'); +import { computeConversionFee } from './conversionFee.js'; const handlePayment = async (msg) => { l.info("incoming lightning payment", msg.value, msg.payment_request, msg.settled); diff --git a/routes/lightning/send.js b/routes/lightning/send.js index c0a472d8..a2eedcc8 100644 --- a/routes/lightning/send.js +++ b/routes/lightning/send.js @@ -1,4 +1,4 @@ -module.exports = ah(async (req, res) => { +export default ah(async (req, res) => { let { amount, route, memo, payreq } = req.body; let { user } = req; |
