-
Notifications
You must be signed in to change notification settings - Fork 315
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
[bugfix/LIVE-11512]: return correct translation for user refused on device from swap-live-app #6665
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 5 Ignored Deployments
|
Generating screenshots: workflow ended Jobs status: |
b5e0035
to
e051999
Compare
@@ -733,18 +738,23 @@ export const renderError = ({ | |||
withDescription?: boolean; | |||
Icon?: (props: { color?: string | undefined; size?: number | undefined }) => JSX.Element; | |||
}) => { | |||
let tmpError = error; |
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.
May I know why ?
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 it's about the line 752 to update the error type to a specific type. But you can do this after the first 3 assertions, it will be more clear. If the first 3 catches do not catch the error, then you do a check (error instanceof CompleteExchangeError && error.message === 'User refused'
) to see whether the error type needs an update.
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 believe this is correct, if we aren't doing any variable assignment at line 752
, i can removed the let tmpError
@@ -733,18 +738,23 @@ export const renderError = ({ | |||
withDescription?: boolean; | |||
Icon?: (props: { color?: string | undefined; size?: number | undefined }) => JSX.Element; | |||
}) => { | |||
let tmpError = error; |
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 believe this is correct, if we aren't doing any variable assignment at line 752
, i can removed the let tmpError
β Checklist
npx changeset
was attached.π Description
return correct translation for user refused on device from swap-live-app
β Context
https://ledgerhq.atlassian.net/browse/LIVE-11512
π§ Checklist for the PR Reviewers