aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-02-16 19:52:43 +0000
committerAdam Soltys <[email protected]>2024-02-16 19:52:43 +0000
commitc9a70b8e4ca7fdb7f8e03e94ef1f24753bd24f94 (patch)
treec8839fdfb3a9bc07a7d352bd37ee958be94e7681
parentdf38624511d55e819cccd2a54c53b06c59e2ee67 (diff)
downloadcoinos-server-c9a70b8e4ca7fdb7f8e03e94ef1f24753bd24f94.tar.gz
coinos-server-c9a70b8e4ca7fdb7f8e03e94ef1f24753bd24f94.zip
unlock wallet for bump
-rw-r--r--routes/payments.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js
index 9e4122f6..3dd8e5e3 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -426,9 +426,11 @@ export default {
ourfee,
);
+ if (config[type].walletpass)
+ await node.walletPassphrase(config[type].walletpass, 300);
p.hex = (await node.signRawTransactionWithWallet(newTx.hex)).hex;
let r = await node.testMempoolAccept([p.hex]);
- if (!r[0].allowed) fail("transaction rejected");
+ if (!r[0].allowed) fail(`transaction rejected ${p.hex}`);
p.hash = await node.sendRawTransaction(p.hex);
p.fee = sats(newTx.fee);
await s(`payment:${id}`, p);