Skip to content

Commit ec00f1b

Browse files
runway-github[bot]wachuneitommasiniNicolasMassart
authored
chore(runway): cherry-pick fix(deposit): crypto currency property in event (#17913)
- fix(deposit): cp-7.53.0 crypto currency property in event (#17905) <!-- 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** This PR fixes an incorrect event property ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **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** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] 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. [260086f](260086f) Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com> Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com> Co-authored-by: tommasini <tommasini15@gmail.com> Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
1 parent 3c933d2 commit ec00f1b

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

app/components/UI/Ramp/Deposit/Views/BankDetails/BankDetails.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const BankDetails = () => {
6464
const { colors } = useTheme();
6565
const dispatch = useDispatch();
6666
const dispatchThunk = useThunkDispatch();
67-
const { sdk, selectedWalletAddress, selectedRegion } = useDepositSDK();
67+
const { sdk, selectedRegion } = useDepositSDK();
6868
const trackEvent = useAnalytics();
6969

7070
const { orderId, shouldUpdate = true } = useParams<BankDetailsParams>();
@@ -262,7 +262,7 @@ const BankDetails = () => {
262262
payment_method_id: order.data.paymentMethod,
263263
country: selectedRegion?.isoCode || '',
264264
chain_id: cryptoCurrency?.chainId || '',
265-
currency_destination: selectedWalletAddress || order.data.walletAddress,
265+
currency_destination: cryptoCurrency?.assetId || '',
266266
currency_source: order.data.fiatCurrency,
267267
});
268268

@@ -284,7 +284,6 @@ const BankDetails = () => {
284284
order,
285285
trackEvent,
286286
selectedRegion?.isoCode,
287-
selectedWalletAddress,
288287
confirmPayment,
289288
handleOnRefresh,
290289
]);

app/components/UI/Ramp/Deposit/Views/OrderProcessing/OrderProcessing.test.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ describe('OrderProcessing Component', () => {
231231
payment_method_id: 'credit_debit_card',
232232
country: 'US',
233233
chain_id: 'eip155:1',
234-
currency_destination: mockSelectedWalletAddress,
234+
currency_destination:
235+
'eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
235236
currency_source: 'USD',
236237
},
237238
);
@@ -265,7 +266,8 @@ describe('OrderProcessing Component', () => {
265266
payment_method_id: 'credit_debit_card',
266267
country: 'US',
267268
chain_id: 'eip155:1',
268-
currency_destination: '0x1234567890123456789012345678901234567890',
269+
currency_destination:
270+
'eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
269271
currency_source: 'USD',
270272
},
271273
);
@@ -307,7 +309,8 @@ describe('OrderProcessing Component', () => {
307309
payment_method_id: 'credit_debit_card',
308310
country: 'US',
309311
chain_id: 'eip155:1',
310-
currency_destination: mockSelectedWalletAddress,
312+
currency_destination:
313+
'eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
311314
currency_source: 'USD',
312315
},
313316
);
@@ -340,7 +343,8 @@ describe('OrderProcessing Component', () => {
340343
payment_method_id: 'credit_debit_card',
341344
country: 'US',
342345
chain_id: 'eip155:1',
343-
currency_destination: mockSelectedWalletAddress,
346+
currency_destination:
347+
'eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
344348
currency_source: 'USD',
345349
error_message: 'transaction_failed',
346350
},

app/components/UI/Ramp/Deposit/Views/OrderProcessing/OrderProcessing.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ const OrderProcessing = () => {
104104
payment_method_id: order.data.paymentMethod,
105105
country: selectedRegion?.isoCode || '',
106106
chain_id: cryptoCurrency?.chainId || '',
107-
currency_destination:
108-
selectedWalletAddress || order.data.walletAddress,
107+
currency_destination: cryptoCurrency?.assetId || '',
109108
currency_source: order.data.fiatCurrency,
110109
};
111110

app/components/UI/Ramp/Deposit/hooks/useDepositRouting.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,8 @@ describe('useDepositRouting', () => {
893893
payment_method_id: 'credit_debit_card',
894894
country: 'US',
895895
chain_id: 'eip155:1',
896-
currency_destination: '0x123',
896+
currency_destination:
897+
'eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
897898
currency_source: 'USD',
898899
},
899900
);

app/components/UI/Ramp/Deposit/hooks/useDepositRouting.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ export const useDepositRouting = ({
263263
payment_method_id: order.paymentMethod,
264264
country: selectedRegion?.isoCode || '',
265265
chain_id: cryptoCurrency?.chainId || '',
266-
currency_destination:
267-
selectedWalletAddress || order.walletAddress,
266+
currency_destination: cryptoCurrency?.assetId || '',
268267
currency_source: order.fiatCurrency,
269268
});
270269
} catch (error) {

0 commit comments

Comments
 (0)