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

Better payment timed out messaging #677

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Better payment timed out messaging #677

merged 3 commits into from
Nov 10, 2023

Conversation

futurepaul
Copy link
Collaborator

@futurepaul futurepaul commented Nov 8, 2023

we can handle other specific failures as well but this is a good start I think

Screenshot 2023-11-08 at 4 59 51 PM

Part of #569

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 76de35f
Status: ✅  Deploy successful!
Preview URL: https://6e55c09a.mutiny-web.pages.dev
Branch Preview URL: https://better-pending.mutiny-web.pages.dev

View logs

@@ -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`
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

Comment on lines +665 to +666
sentDetails()?.failure_reason ||
"Payment failed for an unknown reason"
Copy link
Collaborator

@benthecarman benthecarman Nov 9, 2023

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 !

Copy link
Collaborator Author

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

Copy link
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

@futurepaul futurepaul merged commit ec3adb0 into master Nov 10, 2023
5 checks passed
@futurepaul futurepaul deleted the better-pending branch November 10, 2023 20:54
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