We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8bb4bb commit 49b4c24Copy full SHA for 49b4c24
src/app/hooks/useTxErrorMessage.ts
@@ -3,11 +3,9 @@ import { TxError } from '../../oasis-nexus/api'
3
4
export const useTxErrorMessage = (error: TxError | undefined): string | undefined => {
5
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
- )
+ if (!error) {
10
return undefined
+ }
11
if (error.module === 'evm' && error.code === 8 && !error.message && !error.raw_message) {
12
// EVM reverted, without any message
13
return `${t('errors.revertedWithoutMessage')} (${t('errors.code')} ${error.code}, ${t('errors.module')}: ${error.module})`
0 commit comments