aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index d5452ec..cba23ba 100644
--- a/src/app.js
+++ b/src/app.js
@@ -2764,7 +2764,10 @@ async function broadcast() {
render();
try {
const hexTx = wallet.sign(ui.draft.tx);
- const txid = await wallet.broadcast(hexTx);
+ const txid = await Promise.race([
+ wallet.broadcast(hexTx),
+ new Promise((_, rej) => setTimeout(() => rej(new Error(t('broadcastTimeout'))), 30000)),
+ ]);
ui.sendResult = { txid };
ui.draft = null;
ui.send = blankSend();