Skip to content

Commit

Permalink
Remove offending Recipient ID string from error message for more cons…
Browse files Browse the repository at this point in the history
…istent layout
  • Loading branch information
jferas committed Mar 7, 2024
1 parent 8967d35 commit ddec7ae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/pages/AccountSend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,14 @@ function useSendForm() {
}
}
const toSentenceCase = (str: string) => str[0].toUpperCase() + str.slice(1);
if (e instanceof Error && e.message) return toSentenceCase(e.message);
if (e instanceof Error && e.message) {
if (e.message.includes('Please verify the provided name or address')) {
e.message =
'Please verify the provided name or address is correct. ' +
'If providing an ENS name, ensure it is registered, and has a valid address record.';
}
return toSentenceCase(e.message);
}
if ((e as { reason: string }).reason) return toSentenceCase((e as { reason: string }).reason);
return JSON.stringify(e);
}
Expand Down

0 comments on commit ddec7ae

Please sign in to comment.