Skip to content

Commit

Permalink
fix: migrate from patched @exodus/react-native-payments to @metamask/…
Browse files Browse the repository at this point in the history
…react-native-payments (#9483)
  • Loading branch information
legobeat authored May 2, 2024
1 parent 6d9244e commit 7359233
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 79 deletions.
1 change: 0 additions & 1 deletion app/__mocks__/@exodus/react-native-payments.ts

This file was deleted.

1 change: 1 addition & 0 deletions app/__mocks__/@metamask/react-native-payments.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@metamask/react-native-payments/lib/js/__mocks__';
2 changes: 1 addition & 1 deletion app/components/UI/Ramp/hooks/useApplePay.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback } from 'react';
// @ts-expect-error ts(7016) react-native-payments is not typed
import { PaymentRequest } from '@exodus/react-native-payments';
import { PaymentRequest } from '@metamask/react-native-payments';

import { strings } from '../../../../../locales/i18n';
import Logger from '../../../../util/Logger';
Expand Down
2 changes: 1 addition & 1 deletion app/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Ex. This makes it so that when you import CloseIcon from './close-icon.svg, CloseIcon, will be detected as a React.FC component.
declare module '*.mp4';

declare module '@exodus/react-native-payments/lib/js/__mocks__';
declare module '@metamask/react-native-payments/lib/js/__mocks__';

declare module 'react-native-fade-in-image';

Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def common_target_logic

# Pods for MetaMask
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
pod 'ReactNativePayments', :path => '../node_modules/@exodus/react-native-payments/lib/ios/'
pod 'ReactNativePayments', :path => '../node_modules/@metamask/react-native-payments/lib/ios/'

# Pods for Push Notifications
pod 'Firebase', :modular_headers => true
Expand Down
12 changes: 6 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ PODS:
- React-jsi (= 0.71.15)
- React-logger (= 0.71.15)
- React-perflogger (= 0.71.15)
- ReactNativePayments (1.5.0):
- ReactNativePayments (2.0.0):
- React
- rn-fetch-blob (0.12.0):
- React-Core
Expand Down Expand Up @@ -776,7 +776,7 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "ReactNativePayments (from `../node_modules/@exodus/react-native-payments/lib/ios/`)"
- "ReactNativePayments (from `../node_modules/@metamask/react-native-payments/lib/ios/`)"
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)"
Expand Down Expand Up @@ -968,7 +968,7 @@ EXTERNAL SOURCES:
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
ReactNativePayments:
:path: "../node_modules/@exodus/react-native-payments/lib/ios/"
:path: "../node_modules/@metamask/react-native-payments/lib/ios/"
rn-fetch-blob:
:path: "../node_modules/rn-fetch-blob"
RNCAsyncStorage:
Expand Down Expand Up @@ -1028,7 +1028,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
boost: 57d2868c099736d80fcd648bf211b4431e51a558
boost: 7dcd2de282d72e344012f7d6564d024930a6a440
Branch: 4ac024cb3c29b0ef628048694db3c4cfa679beb0
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
Expand Down Expand Up @@ -1118,7 +1118,7 @@ SPEC CHECKSUMS:
React-RCTVibration: a97783e3645ddf852e34da2e015656e309f3a083
React-runtimeexecutor: 8f2ddd9db7874ec7de84f5c55d73aeaaf82908e2
ReactCommon: 4a6ace8e5bd40d585223775ba56d002173e72fb2
ReactNativePayments: a4e3ac915256a4e759c8a04338b558494a63a0f5
ReactNativePayments: db62ee22a825e9e9c3e19c276d8d020881dd0630
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNCAsyncStorage: 826b603ae9c0f88b5ac4e956801f755109fa4d5c
RNCCheckbox: ed1b4ca295475b41e7251ebae046360a703b6eb5
Expand Down Expand Up @@ -1152,6 +1152,6 @@ SPEC CHECKSUMS:
Yoga: 68c9c592c3e80ec37ff28db20eedb13d84aae5df
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 6c1ebc1c49e824e5d559b52f89962406257a7f5c
PODFILE CHECKSUM: b041bcd5cf0f3b6d41c16392ee13a01dd5e6052a

COCOAPODS: 1.12.1
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"react-native-level-fs/**/bl": "^1.2.3",
"react-native-level-fs/levelup/semver": "^5.7.2",
"@metamask/contract-metadata": "^2.1.0",
"@exodus/react-native-payments/validator": "^13.7.0",
"@metamask/react-native-payments/validator": "^13.7.0",
"**/minimist": "1.2.6",
"d3-color": "3.1.0",
"tough-cookie": "4.1.3",
Expand All @@ -131,7 +131,6 @@
"@eth-optimism/contracts": "0.0.0-2021919175625",
"@ethereumjs/tx": "^3.2.1",
"@ethersproject/abi": "^5.7.0",
"@exodus/react-native-payments": "git+https://github.com/MetaMask/react-native-payments.git#dbc8cbbed570892d2fea5e3d183bf243e062c1e5",
"@keystonehq/bc-ur-registry-eth": "^0.19.1",
"@keystonehq/metamask-airgapped-keyring": "^0.13.1",
"@keystonehq/ur-decoder": "^0.12.2",
Expand Down Expand Up @@ -160,6 +159,7 @@
"@metamask/preferences-controller": "^4.0.0",
"@metamask/react-native-animated-fox": "^2.1.0",
"@metamask/react-native-button": "^3.0.0",
"@metamask/react-native-payments": "^2.0.0",
"@metamask/react-native-splash-screen": "^3.2.0",
"@metamask/rpc-errors": "^6.2.1",
"@metamask/scure-bip39": "^2.1.0",
Expand Down
59 changes: 0 additions & 59 deletions patches/@exodus+react-native-payments+1.5.0.patch

This file was deleted.

17 changes: 9 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2289,14 +2289,6 @@
"@ethersproject/properties" "^5.7.0"
"@ethersproject/strings" "^5.7.0"

"@exodus/react-native-payments@git+https://github.com/MetaMask/react-native-payments.git#dbc8cbbed570892d2fea5e3d183bf243e062c1e5":
version "1.5.0"
resolved "git+https://github.com/MetaMask/react-native-payments.git#dbc8cbbed570892d2fea5e3d183bf243e062c1e5"
dependencies:
es6-error "^4.0.2"
uuid "3.3.2"
validator "^7.0.0"

"@expo/config-plugins@^7.2.5":
version "7.2.5"
resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-7.2.5.tgz#b15f22878975fdc4ddcfa8cdc971937ddc4c0249"
Expand Down Expand Up @@ -4406,6 +4398,15 @@
dependencies:
prop-types "^15.5.10"

"@metamask/react-native-payments@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@metamask/react-native-payments/-/react-native-payments-2.0.0.tgz#64d48028a8c0de1bf5332b01c3ddd5ca61c8fbdb"
integrity sha512-XUdZsD+RpNGwUPpwdgcVqe+ugRqhpvEU9ihL9n3VbWN7g6p3RdK0JuQ9g19WA7xcU1l2Rg9dCxkMytNin+uOSA==
dependencies:
es6-error "^4.0.2"
uuid "3.3.2"
validator "^7.0.0"

"@metamask/react-native-splash-screen@^3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@metamask/react-native-splash-screen/-/react-native-splash-screen-3.2.0.tgz#06a6547c143b088e47af40eacea9ac6657ac937f"
Expand Down

0 comments on commit 7359233

Please sign in to comment.