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

fix(common): live-9252 update buy/sell api and expose methods in onRampProvider #4815

Conversation

beths-ledger
Copy link
Contributor

@beths-ledger beths-ledger commented Sep 22, 2023

📝 Description

The onRampProvider was using out of date cached CDN endpoint, which hid available currencies like NEAR.
This PR updates the API that informs whether currencies can be bought or sold so that new currencies like NEAR show as available.

  • Expose isCurrencySupported and getSupportedCurrencyIds methods from useRampProvider hook.
  • Add unit tests for helper functions

Updates screenshots to reflect only the new correct API responses:

  1. "binance_beacon_chain". i.e. BNB Should NOT be available to BUY ✅
  2. "cardano" SHOULD be available to BUY ✅
  3. "solana" SHOULD be available to SWAP and BUY ✅
  4. "ethereum/erc20/usd__coin" i.e. USDC SHOULD be available to SWAP ✅

❓ Context

✅ Checklist

  • Test coverage
  • Atomic delivery
  • No breaking changes

📸 Demo

image

image

near-can-stake

🚀 Expectations to reach

Please make sure you follow these Important Steps.

Pull Requests must pass the CI and be internally validated in order to be merged.

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2023

🦋 Changeset detected

Latest commit: 3af4459

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
ledger-live-desktop Minor
@ledgerhq/live-common Minor
@ledgerhq/live-cli Patch
live-mobile Patch
web-tools Patch
@ledgerhq/test-utils Patch
dummy-wallet-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
live-common-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 9:55am
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2023 9:55am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2023 9:55am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2023 9:55am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2023 9:55am
web-tools ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2023 9:55am

@github-actions github-actions bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common labels Sep 22, 2023
@beths-ledger beths-ledger marked this pull request as ready for review September 22, 2023 12:08
@beths-ledger beths-ledger changed the title fix(LIVE-9252): update buy/sell api and expose methods in onRampProvider fix(common): live-9252 update buy/sell api and expose methods in onRampProvider Sep 22, 2023
@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from 1442caa to 0432d40 Compare September 22, 2023 16:06
@beths-ledger beths-ledger requested a review from a team September 22, 2023 16:07
@beths-ledger

This comment was marked as outdated.

@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from d73444a to 3950235 Compare September 25, 2023 14:06
@beths-ledger beths-ledger requested a review from a team September 25, 2023 14:07
@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from 3950235 to 07051f4 Compare September 25, 2023 14:29
@beths-ledger

This comment was marked as outdated.

@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from dabc382 to b101899 Compare September 27, 2023 15:56
@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from d41be4f to a67a282 Compare October 2, 2023 10:31
@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from e466866 to 4b54f55 Compare October 4, 2023 13:00
@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from 4b54f55 to 37344c0 Compare October 4, 2023 13:55
@gre
Copy link
Contributor

gre commented Oct 12, 2023

as there are a screenshot conflict, please rebase and /generate-screenshots when the CI is stable on develop again

fix: remove unused platform and providerview

refactor: uniquely name isAvailable, fix types

fix: use correct currency id in market list

refactor: pr review lint fixes
@beths-ledger beths-ledger force-pushed the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch from 37344c0 to 09bbe7a Compare October 17, 2023 08:37
@beths-ledger
Copy link
Contributor Author

beths-ledger commented Oct 17, 2023

@beths-ledger

Generating screenshots: workflow ended

Jobs status:
✅ - generate-screenshots-windows
✅ - generate-screenshots-mac
✅ - generate-screenshots-linux

@beths-ledger beths-ledger merged commit 4164a65 into develop Oct 17, 2023
56 checks passed
@beths-ledger beths-ledger deleted the bugfix/live-9252-earn-on-dynamic-modal-for-earn-no-option-to-buy-near-when-it-should-be-available branch October 17, 2023 12:33
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 screenshots Screenshots have been updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants