Skip to content

Commit 49b4c24

Browse files
committed
Revert "Don't show TX error messages for empty error blocks"
This reverts commit eb18b00.
1 parent b8bb4bb commit 49b4c24

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/app/hooks/useTxErrorMessage.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import { TxError } from '../../oasis-nexus/api'
33

44
export const useTxErrorMessage = (error: TxError | undefined): string | undefined => {
55
const { t } = useTranslation()
6-
if (
7-
!error ||
8-
(!error.module && !error.code) // TODO: This second check shouldn't be necessary. Remove when https://github.com/oasisprotocol/nexus/issues/704 is fixed.
9-
)
6+
if (!error) {
107
return undefined
8+
}
119
if (error.module === 'evm' && error.code === 8 && !error.message && !error.raw_message) {
1210
// EVM reverted, without any message
1311
return `${t('errors.revertedWithoutMessage')} (${t('errors.code')} ${error.code}, ${t('errors.module')}: ${error.module})`

0 commit comments

Comments
 (0)