Skip to content

Commit 227e15f

Browse files
authored
chore(ramp): upgrade ramp-sdk to @2.0.4 (#13318)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This upgrades @consensys/on-ramp-sdk to 2.0.3, which is a major version change that updates the getQuotes and getSellQuotes interfaces. ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to ramp experience and confirm that quotes and sell quotes are loaded. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent ace880e commit 227e15f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

app/components/UI/Ramp/Views/Quotes/Quotes.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ describe('Quotes', () => {
159159
mockUseQuotesValues = {
160160
...mockUseQuotesInitialValues,
161161
isFetching: true,
162-
data: null,
162+
data: undefined,
163163
};
164164
render(Quotes);
165165
expect(mockSetOptions).toBeCalledTimes(1);
@@ -200,7 +200,7 @@ describe('Quotes', () => {
200200
mockUseQuotesValues = {
201201
...mockUseQuotesInitialValues,
202202
isFetching: true,
203-
data: null,
203+
data: undefined,
204204
};
205205
render(Quotes);
206206
const fetchingQuotesText = screen.getByText('Fetching quotes');

app/components/UI/Ramp/hooks/useQuotes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function useQuotes(amount: number | string) {
2121
);
2222

2323
return {
24-
data,
24+
data: data?.quotes,
2525
isFetching,
2626
error,
2727
query,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
},
146146
"dependencies": {
147147
"@config-plugins/detox": "^8.0.0",
148-
"@consensys/on-ramp-sdk": "1.28.8",
148+
"@consensys/on-ramp-sdk": "^2.0.4",
149149
"@keystonehq/bc-ur-registry-eth": "^0.19.1",
150150
"@keystonehq/metamask-airgapped-keyring": "^0.13.1",
151151
"@keystonehq/ur-decoder": "^0.12.2",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,10 +1429,10 @@
14291429
dependencies:
14301430
expo-build-properties "~0.12.1"
14311431

1432-
"@consensys/on-ramp-sdk@1.28.8":
1433-
version "1.28.8"
1434-
resolved "https://registry.yarnpkg.com/@consensys/on-ramp-sdk/-/on-ramp-sdk-1.28.8.tgz#e39d833974d9d49653a2ec107ffbebadb49580d1"
1435-
integrity sha512-snm1hGjIaFMHvB7seLoaBgUQXH1n8/iXPMSm96d5QItFKVw4GZyqsKRnuT2u/CwIeXtYOKf59q7+Lp0UMg+mFQ==
1432+
"@consensys/on-ramp-sdk@^2.0.4":
1433+
version "2.0.4"
1434+
resolved "https://registry.yarnpkg.com/@consensys/on-ramp-sdk/-/on-ramp-sdk-2.0.4.tgz#5068e1059510428bedff42e101bfc3a9060b1756"
1435+
integrity sha512-T8HsVlUe3hlC1c6umAT7nF4QG7oL7l0xgKTs7vob3bsVTNnnIo4uMsEYTbCI9El8gAnKiC9xHlXAZT9cXouFlA==
14361436
dependencies:
14371437
async "^3.2.3"
14381438
axios "^0.28.0"

0 commit comments

Comments
 (0)