-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: dont throw on missing smart wallet #60
Conversation
0b94418
to
ddf428a
Compare
packages/rpc/src/batchQuery.ts
Outdated
return [ | ||
pathToKey(paths[index]), | ||
{ error: entry.result.response.log }, | ||
{ error: { code, codespace, log } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if message
is not a more appropriate name on the JS side
{ error: { code, codespace, log } }, | |
{ error: { code, codespace, message: log } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
) { | ||
smartWalletStatusNotifierKit.updater.updateState( | ||
harden({ provisioned: false }), | ||
); | ||
} else { | ||
throw Error(err); | ||
throw Error(log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further consumers might be interested in the code values to do similar filtering
throw Error(log); | |
const err = Error(log); | |
err.code = code; | |
err.codespace = codespace; | |
throw err; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll opt to keep as is since the proper way is to create a new type (not cast err to any) and export it. This would be a breaking change, and we don't expect the dapps to change how they handle this error with this fix.
ddf428a
to
49d94a7
Compare
49d94a7
to
08a1a99
Compare
fixes #58