fix(#3123): fix blank screen on unhandled wallet error#3613
Conversation
|
✅ All checks succeeded |
2 similar comments
|
✅ All checks succeeded |
|
✅ All checks succeeded |
| }} | ||
| > | ||
| {state?.message}{" "} | ||
| {typeof state?.message === "string" && state?.message} |
There was a problem hiding this comment.
Originally there was a space after the message, do we want to keep it?
60f5c5a to
23da493
Compare
|
✅ All checks succeeded |
2 similar comments
|
✅ All checks succeeded |
|
✅ All checks succeeded |
| const errorMessage = | ||
| error && typeof error === "object" && "info" in error | ||
| ? error.info | ||
| : JSON.stringify(error, Object.getOwnPropertyNames(error)); |
There was a problem hiding this comment.
[context]
Some of the wallets' errors contain info key, but the javascript's errors (throw new Error("Whoops!")) contain a message key.
We could support both, but as for that the safest option is just to make sure that we return a string. Possibly after further requests we will consider how exactly to handle it, because maybe there is some other type of error that we have not defined
Ciabas
left a comment
There was a problem hiding this comment.
Good job! 👍
The only puzzling thing is the removal of space, but I leave that to your judgement.
List of changes
Checklist