Skip to content
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

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

samsiegart
Copy link
Contributor

fixes #58

@samsiegart samsiegart force-pushed the patch-upgrade-12 branch 2 times, most recently from 0b94418 to ddf428a Compare November 16, 2023 21:08
return [
pathToKey(paths[index]),
{ error: entry.result.response.log },
{ error: { code, codespace, log } },
Copy link
Member

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

Suggested change
{ error: { code, codespace, log } },
{ error: { code, codespace, message: log } },

Copy link
Contributor Author

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);
Copy link
Member

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

Suggested change
throw Error(log);
const err = Error(log);
err.code = code;
err.codespace = codespace;
throw err;

Copy link
Contributor Author

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.

@samsiegart samsiegart merged commit 7efe070 into upgrade-12-stable Nov 16, 2023
1 check passed
@samsiegart samsiegart deleted the patch-upgrade-12 branch November 16, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants