-
Notifications
You must be signed in to change notification settings - Fork 62
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
Better payment timed out messaging #677
Conversation
Deploying with Cloudflare Pages
|
@@ -1,10 +1,12 @@ | |||
// IMPORTANT: this should match 1:1 with the MutinyJsError enum in mutiny-wasm | |||
// If we can handle all of these, we can handle all the errors that Mutiny can throw | |||
|
|||
// WARNING: autogenerated code, generated by errorsToTs.cjs | |||
// WARNING: autogenerated code, generated by calling: | |||
// `node scripts/errorsToTs.cjs /path/to/mutiny-wasm/src/error.rs` |
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.
Is there a way we could have CI check that this is up-to-date?
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.
ideally this would be generated by wasm-bindgen (something like a string enum: rustwasm/wasm-bindgen#3057) ... anything else is gonna be hacky
sentDetails()?.failure_reason || | ||
"Payment failed for an unknown reason" |
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.
nit: this || "string"
is redundant because we are checking it is defined in the Match
if we can remove it it'd be better, if typescript yells at you fine to keep then, safer than putting a !
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.
yeah solidjs can't do type narrowing for these if
-style components
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.
otherwise lgtm
we can handle other specific failures as well but this is a good start I think
Part of #569