Skip to content

Commit 92728ff

Browse files
committed
feat: uses routes details
1 parent 6aa0ba9 commit 92728ff

File tree

8 files changed

+313
-102
lines changed

8 files changed

+313
-102
lines changed

wallets/rn_cli_wallet/ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ PODS:
940940
- React-Mapbuffer (0.74.3):
941941
- glog
942942
- React-debug
943-
- react-native-compat (2.17.2-canary-ca-1):
943+
- react-native-compat (2.17.2-canary-ca-5):
944944
- DoubleConversion
945945
- glog
946946
- hermes-engine
@@ -961,7 +961,7 @@ PODS:
961961
- ReactCommon/turbomodule/bridging
962962
- ReactCommon/turbomodule/core
963963
- Yoga
964-
- YttriumWrapper (= 0.2.22)
964+
- YttriumWrapper (= 0.4.6)
965965
- react-native-config (1.5.2):
966966
- react-native-config/App (= 1.5.2)
967967
- react-native-config/App (1.5.2):
@@ -1332,7 +1332,7 @@ PODS:
13321332
- VisionCamera/React (4.5.0):
13331333
- React-Core
13341334
- Yoga (0.0.0)
1335-
- YttriumWrapper (0.2.22)
1335+
- YttriumWrapper (0.4.6)
13361336

13371337
DEPENDENCIES:
13381338
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
@@ -1601,7 +1601,7 @@ SPEC CHECKSUMS:
16011601
React-jsitracing: 6b3c8c98313642140530f93c46f5a6ca4530b446
16021602
React-logger: fa92ba4d3a5d39ac450f59be2a3cec7b099f0304
16031603
React-Mapbuffer: 9f68550e7c6839d01411ac8896aea5c868eff63a
1604-
react-native-compat: f7cd4bb640ad1d1f1fd2ebd2932097a5f4dceef5
1604+
react-native-compat: 6faa4d6dc830f46f8db20c8edee159c1981618fc
16051605
react-native-config: d7d8a0c65f7fa523197879f6b777997abbfc987e
16061606
react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06
16071607
react-native-netinfo: 076df4f9b07f6670acf4ce9a75aac8d34c2e2ccc
@@ -1644,7 +1644,7 @@ SPEC CHECKSUMS:
16441644
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
16451645
VisionCamera: 412fec057156eb5fe84a44351e8ed71a072c1228
16461646
Yoga: 88480008ccacea6301ff7bf58726e27a72931c8d
1647-
YttriumWrapper: bcabc27e968d0e942fee0eae8fdfefa2435fcabd
1647+
YttriumWrapper: 7624df90692e87a3f7cdb6e1b6d9c069c7cb16c0
16481648

16491649
PODFILE CHECKSUM: c71b4a1de1dcccdf71d8f7f0d4d9b3c37106456c
16501650

wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/project.pbxproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@
827827
"$(inherited)",
828828
);
829829
INFOPLIST_FILE = RNWeb3WalletTests/Info.plist;
830-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
830+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
831831
LD_RUNPATH_SEARCH_PATHS = (
832832
"$(inherited)",
833833
"@executable_path/Frameworks",
@@ -853,7 +853,7 @@
853853
BUNDLE_LOADER = "$(TEST_HOST)";
854854
COPY_PHASE_STRIP = NO;
855855
INFOPLIST_FILE = RNWeb3WalletTests/Info.plist;
856-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
856+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
857857
LD_RUNPATH_SEARCH_PATHS = (
858858
"$(inherited)",
859859
"@executable_path/Frameworks",
@@ -937,6 +937,7 @@
937937
);
938938
INFOPLIST_FILE = RNWeb3Wallet/Info.plist;
939939
INFOPLIST_KEY_CFBundleDisplayName = "RN Wallet";
940+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
940941
LD_RUNPATH_SEARCH_PATHS = (
941942
"$(inherited)",
942943
"@executable_path/Frameworks",
@@ -1026,6 +1027,7 @@
10261027
);
10271028
INFOPLIST_FILE = RNWeb3Wallet/Info.plist;
10281029
INFOPLIST_KEY_CFBundleDisplayName = "RN Wallet";
1030+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
10291031
LD_RUNPATH_SEARCH_PATHS = (
10301032
"$(inherited)",
10311033
"@executable_path/Frameworks",
@@ -1116,6 +1118,7 @@
11161118
);
11171119
INFOPLIST_FILE = "RNWeb3Wallet/Debug-Info.plist";
11181120
INFOPLIST_KEY_CFBundleDisplayName = "RN Wallet";
1121+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
11191122
LD_RUNPATH_SEARCH_PATHS = (
11201123
"$(inherited)",
11211124
"@executable_path/Frameworks",
@@ -1204,6 +1207,7 @@
12041207
);
12051208
INFOPLIST_FILE = "RNWeb3Wallet/Debug-Info.plist";
12061209
INFOPLIST_KEY_CFBundleDisplayName = "RN Wallet";
1210+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
12071211
LD_RUNPATH_SEARCH_PATHS = (
12081212
"$(inherited)",
12091213
"@executable_path/Frameworks",
@@ -1295,6 +1299,7 @@
12951299
);
12961300
INFOPLIST_FILE = "RNWeb3Wallet/Internal-Info.plist";
12971301
INFOPLIST_KEY_CFBundleDisplayName = "RN Wallet";
1302+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
12981303
LD_RUNPATH_SEARCH_PATHS = (
12991304
"$(inherited)",
13001305
"@executable_path/Frameworks",
@@ -1386,6 +1391,7 @@
13861391
);
13871392
INFOPLIST_FILE = "RNWeb3Wallet/Internal-Info.plist";
13881393
INFOPLIST_KEY_CFBundleDisplayName = "RN Wallet";
1394+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
13891395
LD_RUNPATH_SEARCH_PATHS = (
13901396
"$(inherited)",
13911397
"@executable_path/Frameworks",
@@ -1473,7 +1479,7 @@
14731479
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
14741480
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
14751481
);
1476-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
1482+
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
14771483
LD = "";
14781484
LDPLUSPLUS = "";
14791485
LD_RUNPATH_SEARCH_PATHS = (
@@ -1557,7 +1563,7 @@
15571563
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
15581564
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
15591565
);
1560-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
1566+
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
15611567
LD = "";
15621568
LDPLUSPLUS = "";
15631569
LD_RUNPATH_SEARCH_PATHS = (

wallets/rn_cli_wallet/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
"@react-navigation/native-stack": "6.10.1",
3434
"@react-navigation/stack": "6.4.1",
3535
"@reown/appkit-ui-react-native": "1.0.1",
36-
"@reown/walletkit": "1.1.1-canary-ca-1",
36+
"@reown/walletkit": "1.1.1-canary-ca-3",
3737
"@sentry/react-native": "5.32.0",
3838
"@walletconnect/core": "2.17.2",
39-
"@walletconnect/react-native-compat": "2.17.2-canary-ca-4",
39+
"@walletconnect/react-native-compat": "2.17.2-canary-ca-5",
4040
"dayjs": "1.11.11",
4141
"ethers": "5.7.2",
4242
"patch-package": "8.0.0",

wallets/rn_cli_wallet/src/hooks/useWalletKitEventsManager.ts

Lines changed: 172 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function useWalletKitEventsManager(initialized: boolean) {
1414
*****************************************************************************/
1515
const onSessionProposal = useCallback(
1616
(proposal: SignClientTypes.EventArguments['session_proposal']) => {
17-
console.log('onSessionProposal', proposal);
17+
console.log('onSessionProposal', JSON.stringify(proposal, null, 2));
1818
// set the verify context so it can be displayed in the projectInfoCard
1919
SettingsStore.setCurrentRequestVerifyContext(proposal.verifyContext);
2020

@@ -41,7 +41,9 @@ export default function useWalletKitEventsManager(initialized: boolean) {
4141
console.log('onSessionRequest', requestEvent);
4242
const {topic, params, verifyContext} = requestEvent;
4343
const {request} = params;
44+
console.log('request', JSON.stringify(requestEvent, null, 2));
4445
const requestSession = walletKit.engine.signClient.session.get(topic);
46+
console.log('requestSession', JSON.stringify(requestSession, null, 2));
4547
// set the verify context so it can be displayed in the projectInfoCard
4648
SettingsStore.setCurrentRequestVerifyContext(verifyContext);
4749

@@ -97,7 +99,175 @@ export default function useWalletKitEventsManager(initialized: boolean) {
9799
* Set up WalletKit event listeners
98100
*****************************************************************************/
99101
useEffect(() => {
100-
if (initialized) {
102+
if (initialized && walletKit) {
103+
// ModalStore.open('SessionSendTransactionModal', {
104+
// requestEvent: {
105+
// id: 1734344941527167,
106+
// topic:
107+
// '3cb5a65c0c87fffa21b19a3772ca6117040c80c4f4bd0e729c417ad1d119ea48',
108+
// params: {
109+
// request: {
110+
// method: 'eth_sendTransaction',
111+
// params: [
112+
// {
113+
// data: '0xa9059cbb00000000000000000000000013a2ff792037aa2cd77fe1f4b522921ac59a9c5200000000000000000000000000000000000000000000000000000000001e8480',
114+
// from: '0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
115+
// to: '0x0b2c639c533813f4aa9d7837caf62653d097ff85',
116+
// },
117+
// ],
118+
// expiryTimestamp: 1734345241,
119+
// },
120+
// chainId: 'eip155:10',
121+
// },
122+
// verifyContext: {
123+
// verified: {
124+
// verifyUrl: 'https://verify.walletconnect.org',
125+
// validation: 'VALID',
126+
// origin: 'https://appkit-lab.reown.com',
127+
// isScam: null,
128+
// },
129+
// },
130+
// },
131+
// requestSession: {
132+
// relay: {
133+
// protocol: 'irn',
134+
// },
135+
// namespaces: {
136+
// eip155: {
137+
// chains: [
138+
// 'eip155:1',
139+
// 'eip155:10',
140+
// 'eip155:137',
141+
// 'eip155:324',
142+
// 'eip155:42161',
143+
// 'eip155:8453',
144+
// 'eip155:100',
145+
// 'eip155:1313161554',
146+
// ],
147+
// methods: [
148+
// 'personal_sign',
149+
// 'eth_sign',
150+
// 'eth_signTransaction',
151+
// 'eth_signTypedData',
152+
// 'eth_signTypedData_v3',
153+
// 'eth_signTypedData_v4',
154+
// 'eth_sendRawTransaction',
155+
// 'eth_sendTransaction',
156+
// ],
157+
// events: ['accountsChanged', 'chainChanged'],
158+
// accounts: [
159+
// 'eip155:1:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
160+
// 'eip155:10:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
161+
// 'eip155:137:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
162+
// 'eip155:324:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
163+
// 'eip155:42161:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
164+
// 'eip155:8453:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
165+
// 'eip155:100:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
166+
// 'eip155:1313161554:0x13A2Ff792037AA2cd77fE1f4B522921ac59a9C52',
167+
// ],
168+
// },
169+
// },
170+
// controller:
171+
// 'ea8f2172d22ace9801b2178a9f55b0053c9ac63d1f5a7d2bc4b79ec84d91244a',
172+
// expiry: 1734080914,
173+
// topic:
174+
// 'f013d8008bf88c77d78f64548f4103d6ec677254f8a9ba89366d5368a79334b0',
175+
// requiredNamespaces: {},
176+
// optionalNamespaces: {
177+
// eip155: {
178+
// methods: [
179+
// 'personal_sign',
180+
// 'eth_sign',
181+
// 'eth_signTransaction',
182+
// 'eth_signTypedData',
183+
// 'eth_signTypedData_v3',
184+
// 'eth_signTypedData_v4',
185+
// 'eth_sendRawTransaction',
186+
// 'eth_sendTransaction',
187+
// 'wallet_getCapabilities',
188+
// 'wallet_sendCalls',
189+
// 'wallet_showCallsStatus',
190+
// 'wallet_getCallsStatus',
191+
// 'wallet_grantPermissions',
192+
// 'wallet_revokePermissions',
193+
// 'wallet_switchEthereumChain',
194+
// ],
195+
// events: ['accountsChanged', 'chainChanged'],
196+
// chains: [
197+
// 'eip155:1',
198+
// 'eip155:10',
199+
// 'eip155:137',
200+
// 'eip155:324',
201+
// 'eip155:42161',
202+
// 'eip155:8453',
203+
// 'eip155:84532',
204+
// 'eip155:1301',
205+
// 'eip155:11155111',
206+
// 'eip155:100',
207+
// 'eip155:295',
208+
// 'eip155:1313161554',
209+
// 'eip155:5000',
210+
// ],
211+
// rpcMap: {
212+
// '1': 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A1&projectId=702e2d45d9debca66795614cddb5c1ca',
213+
// '10': 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A10&projectId=702e2d45d9debca66795614cddb5c1ca',
214+
// '100':
215+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A100&projectId=702e2d45d9debca66795614cddb5c1ca',
216+
// '137':
217+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A137&projectId=702e2d45d9debca66795614cddb5c1ca',
218+
// '295': 'https://mainnet.hashio.io/api',
219+
// '324':
220+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A324&projectId=702e2d45d9debca66795614cddb5c1ca',
221+
// '1301':
222+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A1301&projectId=702e2d45d9debca66795614cddb5c1ca',
223+
// '5000':
224+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A5000&projectId=702e2d45d9debca66795614cddb5c1ca',
225+
// '8453':
226+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A8453&projectId=702e2d45d9debca66795614cddb5c1ca',
227+
// '42161':
228+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A42161&projectId=702e2d45d9debca66795614cddb5c1ca',
229+
// '84532':
230+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A84532&projectId=702e2d45d9debca66795614cddb5c1ca',
231+
// '11155111':
232+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A11155111&projectId=702e2d45d9debca66795614cddb5c1ca',
233+
// '1313161554':
234+
// 'https://rpc.walletconnect.org/v1/?chainId=eip155%3A1313161554&projectId=702e2d45d9debca66795614cddb5c1ca',
235+
// },
236+
// },
237+
// },
238+
// pairingTopic:
239+
// 'c0d67be3a41ded5ffa144e8ed6281a057e1e8e9f23003a427c1a70d04a5939f6',
240+
// acknowledged: true,
241+
// self: {
242+
// publicKey:
243+
// 'ea8f2172d22ace9801b2178a9f55b0053c9ac63d1f5a7d2bc4b79ec84d91244a',
244+
// metadata: {
245+
// name: 'React Native Wallet Example',
246+
// description: 'React Native WalletKit by Reown',
247+
// url: 'https://reown.com/walletkit',
248+
// icons: ['https://avatars.githubusercontent.com/u/179229932'],
249+
// redirect: {
250+
// native: 'rn-web3wallet://',
251+
// universal: 'https://appkit-lab.reown.com/rn_walletkit',
252+
// linkMode: true,
253+
// },
254+
// },
255+
// },
256+
// peer: {
257+
// publicKey:
258+
// '9dc9524bd9f09fb0e387729354099c686086757701e417815f73a168c4f31565',
259+
// metadata: {
260+
// name: 'AppKit Lab',
261+
// description:
262+
// 'Explore the AppKit Lab to test the latest AppKit features.',
263+
// url: 'https://appkit-lab.reown.com',
264+
// icons: ['https://appkit-lab.reown.com/favicon.svg'],
265+
// },
266+
// },
267+
// transportType: 'relay',
268+
// },
269+
// });
270+
101271
//sign
102272
walletKit.on('session_proposal', onSessionProposal);
103273
walletKit.on('session_request', onSessionRequest);

wallets/rn_cli_wallet/src/modals/RequestModalV2/RequestModalV2.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {LinearGradient} from 'react-native-linear-gradient';
44
import {CoreTypes} from '@walletconnect/types';
55

66
import {ModalHeader} from './ModalHeader';
7-
import {useTheme} from '@/hooks/useTheme';
87
import {useSnapshot} from 'valtio';
98
import SettingsStore from '@/store/SettingsStore';
109
import VerifyInfoBox from '@/components/VerifyInfoBox';
@@ -57,7 +56,6 @@ function ModalFooter({
5756
verifyContext,
5857
disableApprove,
5958
}: any) {
60-
const Theme = useTheme();
6159
const validation = verifyContext?.verified.validation;
6260
const isScam = verifyContext?.verified.isScam;
6361

0 commit comments

Comments
 (0)