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

feat(llm): πŸ₯… display human readable errors when the send flow fails #8081

Merged
merged 17 commits into from
Oct 30, 2024

Conversation

thesan
Copy link
Contributor

@thesan thesan commented Oct 11, 2024

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

πŸ“ Description

Display human readable errors when the send flow fails.

image
NodeErrors.mov

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 3:09pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 3:09pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 3:09pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 3:09pm
web-tools ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 3:09pm

@live-github-bot live-github-bot bot added mobile Has changes in LLM common Has changes in live-common translations Translation files have been touched labels Oct 11, 2024
@thesan thesan force-pushed the feat/send-flow-better-node-errors branch from 049e4e3 to 1a07f79 Compare October 16, 2024 16:09
@thesan thesan changed the title πŸ₯…(llm): show better send flow node errors πŸ₯…(llm): display human readable errors when the send flow fails Oct 16, 2024
@thesan thesan changed the title πŸ₯…(llm): display human readable errors when the send flow fails feat(llm): πŸ₯… display human readable errors when the send flow fails Oct 16, 2024
@thesan thesan marked this pull request as ready for review October 17, 2024 08:50
@thesan thesan requested a review from a team as a code owner October 17, 2024 08:50
);
}

const InformativeBannerButton = styled(Button).attrs({
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure since it's from the lib but can't we add an active css so the button gets a little white ? (it's done on some buttons of llm but not all of them so it's just an idea not sure that's useful)

Copy link
Contributor Author

@thesan thesan Oct 17, 2024

Choose a reason for hiding this comment

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

I realized that the active style was disabled on the Button component from the DS (it's not the case for quick action buttons and promisables). Here's the commit but I don't have the PR it was part of (this is why I sometime prefer squashing: it removes data in the git repo but makes the GH data easier to find). So I kept the change but made it overidable to hopefully not break anything 🀞.

@cgrellard-ledger do you remember the context of this change ☝️ ?

@live-github-bot live-github-bot bot added the ui Has changes in the design system library label Oct 17, 2024
@thesan
Copy link
Contributor Author

thesan commented Oct 17, 2024

@LucasWerey I just saw that I had forgotten to actualy show the network and coin in the error message. To fix that I had to make some major changes in the createTransactionBroadcastError

message.includes("-25: bad-tnxs-inputs-missingorspent") ||
message.includes("-25: Missing inputs")
) {
return "https://support.ledger.com/article/5129526865821-zd";
Copy link
Contributor

Choose a reason for hiding this comment

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

You should move this outside :)

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!

@thesan thesan force-pushed the feat/send-flow-better-node-errors branch from c25857c to 1a770df Compare October 23, 2024 15:04
@live-github-bot live-github-bot bot added the desktop Has changes in LLD label Oct 23, 2024
@KVNLS
Copy link
Member

KVNLS commented Oct 29, 2024

@thesan is it ready to be merged?

@thesan
Copy link
Contributor Author

thesan commented Oct 29, 2024

@thesan is it ready to be merged?

@KVNLS I think so but it still needs to be reviewed

@thesan thesan merged commit ed24bfd into develop Oct 30, 2024
57 checks passed
@thesan thesan deleted the feat/send-flow-better-node-errors branch October 30, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM translations Translation files have been touched ui Has changes in the design system library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants