-
Notifications
You must be signed in to change notification settings - Fork 326
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
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 5 Skipped Deployments
|
049e4e3
to
1a07f79
Compare
setTimeout(() => (transition.value = withTiming(0, { duration: 200 })), 1200); | ||
}, [text, transition]); | ||
|
||
const copyIconAnimation = useAnimatedStyle(() => ({ |
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 think we could add a toast as it's done with receive copy wdyt ? I think it is a common approach for mobile
pushToast({
id: `copy-receive`,
type: "success",
icon: "success",
title: t("transfer.receive.addressCopied"), // replace it
});
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 tried the toast but it blocks the cta with a tiny closing button and it doesn't follow the user theme AFAICS (white bg on a dark theme). So I kept the subtle same feedback for now.
alignItems="flex-start" | ||
rowGap={16} | ||
> | ||
<Text numberOfLines={3} variant="paragraphLineHeight"> |
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.
Not sure that's fitting for help center I think the message should be fully visible even if it's more than 3 lines
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!
); | ||
} | ||
|
||
const InformativeBannerButton = styled(Button).attrs({ |
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.
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)
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 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 βοΈ ?
import useExportLogs from "~/components/useExportLogs"; | ||
import { ScreenName } from "~/const"; | ||
import Collapsible from "~/newArch/components/Collapsible"; | ||
import CopyButton from "~/newArch/components/CopyButton"; |
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.
You can replace ~/newArch by LLM/ if you want
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.
Good to know π
<Copy /> | ||
</Animated.View> | ||
<Animated.View style={[checkIconAnimation, checkIconStyle]}> | ||
<Check /> |
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.
Maybe use Icons.Check instead of importing the icon directly and change the colour to green ?(as you feel)
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 imported Icons instead of each icon individualy. I'll keep that in mind in the future.
For the color green it felt a bit too flashy compare to the rest of the UI IMO.
@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 |
message.includes("-25: bad-tnxs-inputs-missingorspent") || | ||
message.includes("-25: Missing inputs") | ||
) { | ||
return "https://support.ledger.com/article/5129526865821-zd"; |
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.
You should move this outside :)
β Checklist
npx changeset
was attached.π Description
Display human readable errors when the send flow fails.
NodeErrors.mov
β Context
π§ Checklist for the PR Reviewers