Skip to content

Commit 1d7f291

Browse files
authored
Merge pull request #2407 from oasisprotocol/lw/revert-empty-message
Revert workaround adding empty revert message to transactions without it
2 parents 6d8dd76 + dab4d78 commit 1d7f291

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

.changelog/2407.trivial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Revert workaround adding empty revert message to transactions without it

src/app/hooks/useTxErrorMessage.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ import { TxError } from '../../oasis-nexus/api'
33

44
export const useTxErrorMessage = (error: TxError | undefined): string | undefined => {
55
const { t } = useTranslation()
6-
if (!error) {
7-
return undefined
8-
}
9-
if (error.module === 'evm' && error.code === 8 && !error.message && !error.raw_message) {
10-
// EVM reverted, without any message
11-
return `${t('errors.revertedWithoutMessage')} (${t('errors.code')} ${error.code}, ${t('errors.module')}: ${error.module})`
12-
}
13-
6+
if (!error) return undefined
147
return `${error.message || error.raw_message} (${t('errors.code')} ${error.code}, ${t('errors.module')}: ${error.module})`
158
}

src/locales/en/translation.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@
287287
"invalidUrl": "This URL doesn't exist",
288288
"invalidVote": "Invalid vote",
289289
"alternativelyGoExplore": "Alternatively, discover our ecosystem by exploring Oasis.",
290-
"revertedWithoutMessage": "reverted without a message",
291290
"storage": "Access to browser storage denied"
292291
},
293292
"footer": {

0 commit comments

Comments
 (0)