Skip to content

Commit 1d212f8

Browse files
authored
Merge pull request #68 from EdgeApp/itay/fix-error-422
Display user friendly error message when pending Tx has 0/10 confirmations
2 parents d23130a + 76e2def commit 1d212f8

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)