diff options
| author | Adam Soltys <[email protected]> | 2022-09-06 09:18:19 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-06 09:18:19 -0700 |
| commit | 8a080ef9a198799e7ee31cf81f92afd5495e4074 (patch) | |
| tree | 8da36c843846f47918a5acadd95da30d8d63bcc6 /routes/bitcoin | |
| parent | 412df5f844de11b3fc71bb7ffaf9c8e1d9f19d65 (diff) | |
| download | coinos-server-8a080ef9a198799e7ee31cf81f92afd5495e4074.tar.gz coinos-server-8a080ef9a198799e7ee31cf81f92afd5495e4074.zip | |
missing imports
Diffstat (limited to 'routes/bitcoin')
| -rw-r--r-- | routes/bitcoin/broadcast.js | 1 | ||||
| -rw-r--r-- | routes/bitcoin/fee.js | 1 | ||||
| -rw-r--r-- | routes/bitcoin/receive.js | 7 | ||||
| -rw-r--r-- | routes/bitcoin/send.js | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/routes/bitcoin/broadcast.js b/routes/bitcoin/broadcast.js index ec733101..e4c7ba62 100644 --- a/routes/bitcoin/broadcast.js +++ b/routes/bitcoin/broadcast.js @@ -1,3 +1,4 @@ +import { emit } from "$lib/sockets"; import store from "$lib/store"; export default async (req, res) => { try { diff --git a/routes/bitcoin/fee.js b/routes/bitcoin/fee.js index a47ac05e..af622ca5 100644 --- a/routes/bitcoin/fee.js +++ b/routes/bitcoin/fee.js @@ -1,3 +1,4 @@ +import { emit } from "$lib/sockets"; import buildTx from "$lib/buildtx"; export default async (req, res) => { diff --git a/routes/bitcoin/receive.js b/routes/bitcoin/receive.js index de98170c..15e21121 100644 --- a/routes/bitcoin/receive.js +++ b/routes/bitcoin/receive.js @@ -1,4 +1,6 @@ -import { rates } from "$lib/store"; +import config from "$config"; +import { emit } from "$lib/sockets"; +import store from "$lib/store"; import { notify } from "$lib/notifications"; import { callWebhook } from "$lib/webhooks"; import reverse from 'buffer-reverse'; @@ -7,6 +9,7 @@ import { Op } from '@sequelize/core'; import { fromBase58 } from 'bip32'; import bitcoin from 'bitcoinjs-lib'; import { sendLiquid } from "$routes/liquid/send"; +import { computeConversionFee } from './conversionFee'; const zmqRawBlock = zmq.socket("sub"); zmqRawBlock.connect(config.bitcoin.zmqrawblock); @@ -24,9 +27,9 @@ const network = const queue = {}; const seen = []; -import { computeConversionFee } from './conversionFee'; zmqRawTx.on("message", async (topic, message, sequence) => { + console.log("TX", message) const hex = message.toString("hex"); let tx = bitcoin.Transaction.fromHex(message); diff --git a/routes/bitcoin/send.js b/routes/bitcoin/send.js index 1992bbde..51d702fd 100644 --- a/routes/bitcoin/send.js +++ b/routes/bitcoin/send.js @@ -1,3 +1,4 @@ +import { toSats } from "$lib/utils"; import store from "$lib/store"; import config from "$config"; const btc = config.liquid.btcasset; |
