Skip to content

Commit 76e2def

Browse files
committed
Show user friendly error when pending Tx has 0/10 confirmations
1 parent 5cfcf3c commit 76e2def

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/xmrEngine.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,13 @@ export class MoneroEngine {
705705
this.log.error(
706706
`broadcastTx failed: ${String(e)} ${cleanTxLogs(edgeTransaction)}`
707707
)
708-
throw e
708+
if (e instanceof Error && e.message.includes(' 422 ')) {
709+
throw new Error(
710+
'The Monero network rejected this transaction. You may need to wait for more confirmations'
711+
)
712+
} else {
713+
throw e
714+
}
709715
}
710716
}
711717

0 commit comments

Comments
 (0)