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(LIVE-11102): add rate expired error message #6592

Merged
merged 5 commits into from
Apr 11, 2024

Conversation

lpaquet-ledger
Copy link
Contributor

βœ… Checklist

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

πŸ“ Description

Add error message for expired rate

image

❓ Context

https://ledgerhq.atlassian.net/browse/LIVE-11102


🧐 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)

@lpaquet-ledger lpaquet-ledger requested review from a team as code owners April 2, 2024 12:30
Copy link

vercel bot commented Apr 2, 2024

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

Name Status Preview Comments Updated (UTC)
web-tools βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 4, 2024 1:08pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 1:08pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 1:08pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 1:08pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 1:08pm

@live-github-bot live-github-bot bot added desktop Has changes in LLD common Has changes in live-common translations Translation files have been touched labels Apr 2, 2024
@@ -98,7 +102,14 @@ const initSwap = (input: InitSwapInput): Observable<SwapRequestEvent> => {
});

if (unsubscribed || !res || !res.data) return;
} catch (e) {
} catch (e: any) {
if (e.status == 422) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for now we only have this single error case associated to status code 422, but we might have others in the future.

I would rather test more specifically on the messageKey="WRONG_OR_EXPIRED_RATE_ID"

@@ -104,6 +104,7 @@ export const SwapExchangeRateAmountTooLowOrTooHigh = createCustomErrorClass(
);

export const SwapGenericAPIError = createCustomErrorClass("SwapGenericAPIError");
export const SwapRateExpieredError = createCustomErrorClass("SwapRateExpieredError");
Copy link
Contributor

Choose a reason for hiding this comment

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

Expiered -> Expired

Copy link

vercel bot commented Apr 5, 2024

Deployment failed with the following error:

Too many requests - try again in 1 minute (more than 60, code: "api-deployments-flood").

@lpaquet-ledger lpaquet-ledger merged commit 21f9d07 into develop Apr 11, 2024
50 of 58 checks passed
@lpaquet-ledger lpaquet-ledger deleted the feat/LIVE-11102 branch April 11, 2024 07:48
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 translations Translation files have been touched
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants