fix: fixed rejected by user message (#432)

This commit is contained in:
Linkie Link 2023-09-06 15:06:02 +02:00 committed by GitHub
parent 5ff848bca7
commit 0e62045031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,8 +146,11 @@ export default function createBroadcastSlice(
set({
createAccountModal: false,
toast: {
message: response.error ?? `Transaction failed: ${response.error}`,
hash: response.result.hash,
message:
response.error && response.error !== 'Transaction failed'
? `Transaction failed: ${response.error}`
: 'Transaction rejected by user',
hash: response.result?.hash ?? undefined,
isError: true,
},
})