From c89b93dc1dfe12176c276fd397b8c7f280b4f26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Oliv=C3=A9?= Date: Thu, 23 Mar 2023 17:09:09 +0100 Subject: [PATCH] adding code fence in extension file (#17874) --- app/scripts/platforms/extension.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index faf9af160..3a298e699 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -176,9 +176,14 @@ export default class ExtensionPlatform { _showFailedTransaction(txMeta, errorMessage) { const nonce = parseInt(txMeta.txParams.nonce, 16); const title = 'Failed transaction'; - const message = `Transaction ${nonce} failed! ${ + let message = `Transaction ${nonce} failed! ${ errorMessage || txMeta.err.message }`; + ///: BEGIN:ONLY_INCLUDE_IN(mmi) + if (isNaN(nonce)) { + message = `Transaction failed! ${errorMessage || txMeta.err.message}`; + } + ///: END:ONLY_INCLUDE_IN this._showNotification(title, message); }