@reown/appkit-react-native 0.0.0-feat-multichain-20250925184834 → 0.0.0-feat-multichain-20250930155416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/AppKit.js +18 -5
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/hooks/useAppKitLogs.js +88 -0
- package/lib/commonjs/hooks/useAppKitLogs.js.map +1 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js +1 -0
- package/lib/commonjs/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js +1 -0
- package/lib/commonjs/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js +1 -0
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +3 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/utils/SIWXUtil.js +2 -2
- package/lib/commonjs/utils/SIWXUtil.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/index.js +1 -0
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +1 -0
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-social-view/index.js +1 -0
- package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-view/index.js +1 -0
- package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-network-switch-view/index.js +1 -0
- package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-siwx-sign-view/index.js +1 -0
- package/lib/commonjs/views/w3m-siwx-sign-view/index.js.map +1 -1
- package/lib/module/AppKit.js +19 -6
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/hooks/useAppKitLogs.js +83 -0
- package/lib/module/hooks/useAppKitLogs.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/index.js +2 -1
- package/lib/module/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-search/index.js +2 -1
- package/lib/module/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/index.js +2 -1
- package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +4 -2
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/utils/SIWXUtil.js +3 -3
- package/lib/module/utils/SIWXUtil.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/index.js +2 -1
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +2 -1
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/index.js +2 -1
- package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-view/index.js +2 -1
- package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
- package/lib/module/views/w3m-network-switch-view/index.js +2 -1
- package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
- package/lib/module/views/w3m-siwx-sign-view/index.js +2 -1
- package/lib/module/views/w3m-siwx-sign-view/index.js.map +1 -1
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/hooks/useAppKitLogs.d.ts +57 -0
- package/lib/typescript/hooks/useAppKitLogs.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-search/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-mobile/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-web/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +1 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/SIWXUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-account-default-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-social-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-network-switch-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-siwx-sign-view/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/AppKit.ts +20 -5
- package/src/hooks/useAppKitLogs.ts +129 -0
- package/src/index.ts +8 -0
- package/src/partials/w3m-all-wallets-list/index.tsx +2 -0
- package/src/partials/w3m-all-wallets-search/index.tsx +7 -1
- package/src/partials/w3m-connecting-mobile/index.tsx +3 -1
- package/src/partials/w3m-connecting-web/index.tsx +5 -2
- package/src/types.ts +1 -0
- package/src/utils/SIWXUtil.ts +5 -3
- package/src/views/w3m-account-default-view/index.tsx +3 -1
- package/src/views/w3m-connecting-external-view/index.tsx +3 -1
- package/src/views/w3m-connecting-social-view/index.tsx +3 -1
- package/src/views/w3m-connecting-view/index.tsx +3 -1
- package/src/views/w3m-network-switch-view/index.tsx +2 -0
- package/src/views/w3m-siwx-sign-view/index.tsx +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppKit.d.ts","sourceRoot":"","sources":["../../src/AppKit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppKit.d.ts","sourceRoot":"","sources":["../../src/AppKit.ts"],"names":[],"mappings":"AAqBA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAEb,KAAK,cAAc,E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BtB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,aAAa;IAwCrB,OAAO,CAAC,wBAAwB;YAiDlB,eAAe;YAsDf,mBAAmB;YAWnB,iBAAiB;IAoB/B,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,gBAAgB;YA8BV,oBAAoB;IAUlC,OAAO,CAAC,QAAQ,CAUd;CACH;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAEzD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type LogEntry, type LogLevel } from '@reown/appkit-core-react-native';
|
|
2
|
+
export interface UseAppKitLogsReturn {
|
|
3
|
+
/**
|
|
4
|
+
* All logs from AppKit
|
|
5
|
+
*/
|
|
6
|
+
logs: LogEntry[];
|
|
7
|
+
/**
|
|
8
|
+
* Get logs filtered by level
|
|
9
|
+
*/
|
|
10
|
+
getLogsByLevel: (level: LogLevel) => LogEntry[];
|
|
11
|
+
/**
|
|
12
|
+
* Get recent logs (default: 100)
|
|
13
|
+
*/
|
|
14
|
+
getRecentLogs: (count?: number) => LogEntry[];
|
|
15
|
+
/**
|
|
16
|
+
* Export all logs as JSON string
|
|
17
|
+
*/
|
|
18
|
+
exportLogs: () => string;
|
|
19
|
+
/**
|
|
20
|
+
* Get logging statistics by level
|
|
21
|
+
*/
|
|
22
|
+
getLogsStats: () => Record<LogLevel, number>;
|
|
23
|
+
/**
|
|
24
|
+
* Clear all logs
|
|
25
|
+
*/
|
|
26
|
+
clearLogs: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Convenience getters for different log levels (regular arrays, safe for console.log)
|
|
29
|
+
*/
|
|
30
|
+
errorLogs: LogEntry[];
|
|
31
|
+
warningLogs: LogEntry[];
|
|
32
|
+
infoLogs: LogEntry[];
|
|
33
|
+
debugLogs: LogEntry[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* React hook for accessing AppKit logs
|
|
37
|
+
*
|
|
38
|
+
* This hook provides reactive access to AppKit's internal logging system.
|
|
39
|
+
* It automatically updates when new logs are added or when logs are cleaned up.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* function MyComponent() {
|
|
44
|
+
* const { logs, errorLogs, exportLogs, clearLogs } = useAppKitLogs();
|
|
45
|
+
*
|
|
46
|
+
* return (
|
|
47
|
+
* <View>
|
|
48
|
+
* <Text>Total logs: {logs.length}</Text>
|
|
49
|
+
* <Text>Error logs: {errorLogs.length}</Text>
|
|
50
|
+
* <Button onPress={clearLogs} title="Clear Logs" />
|
|
51
|
+
* </View>
|
|
52
|
+
* );
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const useAppKitLogs: () => UseAppKitLogsReturn;
|
|
57
|
+
//# sourceMappingURL=useAppKitLogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppKitLogs.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAppKitLogs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG9F,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,QAAQ,EAAE,CAAC;IAEjB;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,QAAQ,EAAE,CAAC;IAEhD;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,QAAQ,EAAE,CAAC;IAE9C;;OAEG;IACH,UAAU,EAAE,MAAM,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,MAAM,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE7C;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa,QAAO,mBA8DhC,CAAC"}
|
|
@@ -7,6 +7,7 @@ export { AppKit } from './modal/w3m-modal';
|
|
|
7
7
|
/********** Types **********/
|
|
8
8
|
export type * from '@reown/appkit-core-react-native';
|
|
9
9
|
export type { AppKitNetwork, Storage } from '@reown/appkit-common-react-native';
|
|
10
|
+
export type { SIWXConfig, SIWXMessage, SIWXSession, SIWXStorage, SIWXVerifier } from '@reown/appkit-common-react-native';
|
|
10
11
|
export type { AppKitConfig } from './types';
|
|
11
12
|
/****** Hooks *******/
|
|
12
13
|
export { useAppKit } from './hooks/useAppKit';
|
|
@@ -15,6 +16,7 @@ export { useAccount } from './hooks/useAccount';
|
|
|
15
16
|
export { useWalletInfo } from './hooks/useWalletInfo';
|
|
16
17
|
export { useAppKitEvents, useAppKitEventSubscription } from './hooks/useAppKitEvents';
|
|
17
18
|
export { useAppKitState } from './hooks/useAppKitState';
|
|
19
|
+
export { useAppKitLogs, type UseAppKitLogsReturn } from './hooks/useAppKitLogs';
|
|
18
20
|
/********** Networks **********/
|
|
19
21
|
export { solana, solanaDevnet, solanaTestnet } from '@reown/appkit-common-react-native';
|
|
20
22
|
export { bitcoin, bitcoinTestnet } from '@reown/appkit-common-react-native';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,kBAAkB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,O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BAA6B;AAC7B,mBAAmB,iCAAiC,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAChF,YAAY,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACb,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,sBAAsB;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,gCAAgC;AAChC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE5E,4BAA4B;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,4BAA4B;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-list/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-list/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAOlE,UAAU,mBAAmB;IAC3B,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAAE,WAAW,EAAE,EAAE,mBAAmB,2CAqGlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-search/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-all-wallets-search/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAQlE,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,qBAAqB,2CAkEnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-mobile/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-mobile/index.tsx"],"names":[],"mappings":"AA6BA,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,KAAK,2CA6H1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-web/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/partials/w3m-connecting-web/index.tsx"],"names":[],"mappings":"AA0BA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAmF9D"}
|
|
@@ -103,6 +103,7 @@ export interface AppKitConfig {
|
|
|
103
103
|
/**
|
|
104
104
|
* Optional flag to enable debug mode.
|
|
105
105
|
* When enabled, additional logging and debugging information will be output.
|
|
106
|
+
* Only enabled in development mode.
|
|
106
107
|
*
|
|
107
108
|
* @see {@link https://docs.reown.com/appkit/react-native/core/options#debug | Debug Documentation}
|
|
108
109
|
* @default false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,+BAA+B,EACpC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,UAAU,EAChB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;;;;OAMG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB;;;OAGG;IACH,OAAO,EAAE,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C;
|
|
1
|
+
{"version":3,"file":"SIWXUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SIWXUtil.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAElE,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAc3C;;GAEG;AAEH,eAAO,MAAM,QAAQ;;;sBAUH,MAAM,QAAQ,IAAI,CAAC;;;;;oCAwIG,MAAM,QAAQ,IAAI,CAAC;;uBAsChC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,aAAa,CAAA;KAAE;;;2BAwCvD,iBAAiB;gBAC5B,aAAa,EAAE;iBACd,MAAM,EAAE;;;mCAmGY,OAAO;;;;;;CAcvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-default-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-account-default-view/index.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,kBAAkB,4CA6TjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AA4BA,wBAAgB,sBAAsB,4CA8GrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-social-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-social-view/index.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,oBAAoB,4CAgFnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-view/index.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,cAAc,4CAuG7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-network-switch-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-network-switch-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,4CAmFhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-siwx-sign-view/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-siwx-sign-view/index.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,mBAAmB,4CA0ElC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-react-native",
|
|
3
|
-
"version": "0.0.0-feat-multichain-
|
|
3
|
+
"version": "0.0.0-feat-multichain-20250930155416",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"types": "lib/typescript/index.d.ts",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"provenance": true
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@reown/appkit-common-react-native": "0.0.0-feat-multichain-
|
|
43
|
-
"@reown/appkit-core-react-native": "0.0.0-feat-multichain-
|
|
44
|
-
"@reown/appkit-ui-react-native": "0.0.0-feat-multichain-
|
|
45
|
-
"@walletconnect/universal-provider": "2.21.
|
|
46
|
-
"valtio": "2.1.
|
|
42
|
+
"@reown/appkit-common-react-native": "0.0.0-feat-multichain-20250930155416",
|
|
43
|
+
"@reown/appkit-core-react-native": "0.0.0-feat-multichain-20250930155416",
|
|
44
|
+
"@reown/appkit-ui-react-native": "0.0.0-feat-multichain-20250930155416",
|
|
45
|
+
"@walletconnect/universal-provider": "2.21.10",
|
|
46
|
+
"valtio": "2.1.8"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@walletconnect/react-native-compat": ">=2.16.1",
|
package/src/AppKit.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
SendController,
|
|
16
16
|
BlockchainApiController,
|
|
17
17
|
WalletUtil,
|
|
18
|
+
LogController,
|
|
18
19
|
type RouterControllerState
|
|
19
20
|
} from '@reown/appkit-core-react-native';
|
|
20
21
|
|
|
@@ -144,7 +145,7 @@ export class AppKit {
|
|
|
144
145
|
});
|
|
145
146
|
}
|
|
146
147
|
} catch (error) {
|
|
147
|
-
|
|
148
|
+
LogController.sendError(error, 'AppKit.ts', 'connect');
|
|
148
149
|
throw error;
|
|
149
150
|
}
|
|
150
151
|
}
|
|
@@ -222,6 +223,7 @@ export class AppKit {
|
|
|
222
223
|
event: 'DISCONNECT_SUCCESS'
|
|
223
224
|
});
|
|
224
225
|
} catch (error) {
|
|
226
|
+
LogController.sendError(error, 'AppKit.ts', 'disconnect');
|
|
225
227
|
EventsController.sendEvent({
|
|
226
228
|
type: 'track',
|
|
227
229
|
event: 'DISCONNECT_ERROR'
|
|
@@ -393,8 +395,9 @@ export class AppKit {
|
|
|
393
395
|
|
|
394
396
|
await this.processConnection(connector, namespaces);
|
|
395
397
|
} catch (error) {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
+
LogController.sendError(error, 'AppKit.ts', 'initializeConnector', {
|
|
399
|
+
connectorType: connected.type
|
|
400
|
+
});
|
|
398
401
|
await StorageUtil.removeConnectedConnectors(connected.type);
|
|
399
402
|
}
|
|
400
403
|
}
|
|
@@ -494,6 +497,7 @@ export class AppKit {
|
|
|
494
497
|
);
|
|
495
498
|
}
|
|
496
499
|
} catch (error) {
|
|
500
|
+
LogController.sendError(error, 'AppKit.ts', 'syncIdentity');
|
|
497
501
|
// Continue processing other addresses even if one fails
|
|
498
502
|
}
|
|
499
503
|
}
|
|
@@ -512,8 +516,9 @@ export class AppKit {
|
|
|
512
516
|
this.syncNativeBalance(adapter, network);
|
|
513
517
|
}
|
|
514
518
|
}
|
|
515
|
-
} catch {
|
|
519
|
+
} catch (error) {
|
|
516
520
|
// ignore
|
|
521
|
+
LogController.sendError(error, 'AppKit.ts', 'refreshBalance');
|
|
517
522
|
}
|
|
518
523
|
}
|
|
519
524
|
|
|
@@ -647,7 +652,17 @@ export class AppKit {
|
|
|
647
652
|
this.setCustomWallets(options);
|
|
648
653
|
OptionsController.setFeaturedWalletIds(options.featuredWalletIds);
|
|
649
654
|
OptionsController.setEnableAnalytics(options.enableAnalytics);
|
|
650
|
-
OptionsController.setDebug(options.debug);
|
|
655
|
+
OptionsController.setDebug(options.debug && __DEV__);
|
|
656
|
+
|
|
657
|
+
// Initialize LogController after debug option is set
|
|
658
|
+
LogController.initialize();
|
|
659
|
+
LogController.sendInfo('AppKit initialization started', 'AppKit.ts', 'initControllers', {
|
|
660
|
+
projectId: options.projectId,
|
|
661
|
+
adapters: this.adapters.map(a => a.constructor.name),
|
|
662
|
+
networks: this.networks.map(n => n.name),
|
|
663
|
+
debug: options.debug
|
|
664
|
+
});
|
|
665
|
+
|
|
651
666
|
OptionsController.setFeatures(options.features);
|
|
652
667
|
OptionsController.setRequestedNetworks(this.networks);
|
|
653
668
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { useContext, useMemo } from 'react';
|
|
2
|
+
import { useSnapshot } from 'valtio';
|
|
3
|
+
import { LogController, type LogEntry, type LogLevel } from '@reown/appkit-core-react-native';
|
|
4
|
+
import { AppKitContext } from '../AppKitContext';
|
|
5
|
+
|
|
6
|
+
export interface UseAppKitLogsReturn {
|
|
7
|
+
/**
|
|
8
|
+
* All logs from AppKit
|
|
9
|
+
*/
|
|
10
|
+
logs: LogEntry[];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Get logs filtered by level
|
|
14
|
+
*/
|
|
15
|
+
getLogsByLevel: (level: LogLevel) => LogEntry[];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get recent logs (default: 100)
|
|
19
|
+
*/
|
|
20
|
+
getRecentLogs: (count?: number) => LogEntry[];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Export all logs as JSON string
|
|
24
|
+
*/
|
|
25
|
+
exportLogs: () => string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get logging statistics by level
|
|
29
|
+
*/
|
|
30
|
+
getLogsStats: () => Record<LogLevel, number>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Clear all logs
|
|
34
|
+
*/
|
|
35
|
+
clearLogs: () => void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Convenience getters for different log levels (regular arrays, safe for console.log)
|
|
39
|
+
*/
|
|
40
|
+
errorLogs: LogEntry[];
|
|
41
|
+
warningLogs: LogEntry[];
|
|
42
|
+
infoLogs: LogEntry[];
|
|
43
|
+
debugLogs: LogEntry[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* React hook for accessing AppKit logs
|
|
48
|
+
*
|
|
49
|
+
* This hook provides reactive access to AppKit's internal logging system.
|
|
50
|
+
* It automatically updates when new logs are added or when logs are cleaned up.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* function MyComponent() {
|
|
55
|
+
* const { logs, errorLogs, exportLogs, clearLogs } = useAppKitLogs();
|
|
56
|
+
*
|
|
57
|
+
* return (
|
|
58
|
+
* <View>
|
|
59
|
+
* <Text>Total logs: {logs.length}</Text>
|
|
60
|
+
* <Text>Error logs: {errorLogs.length}</Text>
|
|
61
|
+
* <Button onPress={clearLogs} title="Clear Logs" />
|
|
62
|
+
* </View>
|
|
63
|
+
* );
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export const useAppKitLogs = (): UseAppKitLogsReturn => {
|
|
68
|
+
const context = useContext(AppKitContext);
|
|
69
|
+
|
|
70
|
+
if (context === undefined) {
|
|
71
|
+
throw new Error('useAppKitLogs must be used within an AppKitProvider');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (!context.appKit) {
|
|
75
|
+
throw new Error('AppKit instance is not yet available in context.');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const { logs } = useSnapshot(LogController.state);
|
|
79
|
+
|
|
80
|
+
// Memoized functions that don't need to change on every render
|
|
81
|
+
const stableFunctions = useMemo(
|
|
82
|
+
() => ({
|
|
83
|
+
getLogsByLevel: (level: LogLevel) => LogController.getLogsByLevel(level),
|
|
84
|
+
getRecentLogs: (count?: number) => LogController.getRecentLogs(count),
|
|
85
|
+
exportLogs: () => LogController.exportLogs(),
|
|
86
|
+
getLogsStats: () => LogController.getLogsStats(),
|
|
87
|
+
clearLogs: () => LogController.clearLogs()
|
|
88
|
+
}),
|
|
89
|
+
[]
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const regularArrays = useMemo(() => {
|
|
93
|
+
const allLogs = [...logs]; // Convert proxy to regular array
|
|
94
|
+
const errorLogs: LogEntry[] = [];
|
|
95
|
+
const warningLogs: LogEntry[] = [];
|
|
96
|
+
const infoLogs: LogEntry[] = [];
|
|
97
|
+
const debugLogs: LogEntry[] = [];
|
|
98
|
+
|
|
99
|
+
for (const log of allLogs) {
|
|
100
|
+
switch (log.level) {
|
|
101
|
+
case 'error':
|
|
102
|
+
errorLogs.push(log);
|
|
103
|
+
break;
|
|
104
|
+
case 'warn':
|
|
105
|
+
warningLogs.push(log);
|
|
106
|
+
break;
|
|
107
|
+
case 'info':
|
|
108
|
+
infoLogs.push(log);
|
|
109
|
+
break;
|
|
110
|
+
case 'debug':
|
|
111
|
+
debugLogs.push(log);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
logs: allLogs,
|
|
118
|
+
errorLogs,
|
|
119
|
+
warningLogs,
|
|
120
|
+
infoLogs,
|
|
121
|
+
debugLogs
|
|
122
|
+
};
|
|
123
|
+
}, [logs]);
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
...regularArrays,
|
|
127
|
+
...stableFunctions
|
|
128
|
+
};
|
|
129
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,13 @@ export { AppKit } from './modal/w3m-modal';
|
|
|
17
17
|
/********** Types **********/
|
|
18
18
|
export type * from '@reown/appkit-core-react-native';
|
|
19
19
|
export type { AppKitNetwork, Storage } from '@reown/appkit-common-react-native';
|
|
20
|
+
export type {
|
|
21
|
+
SIWXConfig,
|
|
22
|
+
SIWXMessage,
|
|
23
|
+
SIWXSession,
|
|
24
|
+
SIWXStorage,
|
|
25
|
+
SIWXVerifier
|
|
26
|
+
} from '@reown/appkit-common-react-native';
|
|
20
27
|
export type { AppKitConfig } from './types';
|
|
21
28
|
|
|
22
29
|
/****** Hooks *******/
|
|
@@ -26,6 +33,7 @@ export { useAccount } from './hooks/useAccount';
|
|
|
26
33
|
export { useWalletInfo } from './hooks/useWalletInfo';
|
|
27
34
|
export { useAppKitEvents, useAppKitEventSubscription } from './hooks/useAppKitEvents';
|
|
28
35
|
export { useAppKitState } from './hooks/useAppKitState';
|
|
36
|
+
export { useAppKitLogs, type UseAppKitLogsReturn } from './hooks/useAppKitLogs';
|
|
29
37
|
|
|
30
38
|
/********** Networks **********/
|
|
31
39
|
export { solana, solanaDevnet, solanaTestnet } from '@reown/appkit-common-react-native';
|
|
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import { useSnapshot } from 'valtio';
|
|
3
3
|
import {
|
|
4
4
|
ApiController,
|
|
5
|
+
LogController,
|
|
5
6
|
OptionsController,
|
|
6
7
|
SnackController,
|
|
7
8
|
type OptionsControllerState
|
|
@@ -61,6 +62,7 @@ export function AllWalletsList({ onItemPress }: AllWalletsListProps) {
|
|
|
61
62
|
await ApiController.fetchWallets({ page: 1 });
|
|
62
63
|
setLoading(false);
|
|
63
64
|
} catch (error) {
|
|
65
|
+
LogController.sendError(error, 'AllWalletsList.tsx', 'initialFetch');
|
|
64
66
|
SnackController.showError('Failed to load wallets');
|
|
65
67
|
setLoading(false);
|
|
66
68
|
setLoadingError(true);
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { useSnapshot } from 'valtio';
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ApiController,
|
|
5
|
+
LogController,
|
|
6
|
+
OptionsController,
|
|
7
|
+
SnackController
|
|
8
|
+
} from '@reown/appkit-core-react-native';
|
|
4
9
|
import { type WcWallet } from '@reown/appkit-common-react-native';
|
|
5
10
|
import { useCustomDimensions } from '@reown/appkit-ui-react-native';
|
|
6
11
|
import { Placeholder } from '../w3m-placeholder';
|
|
@@ -36,6 +41,7 @@ export function AllWalletsSearch({ searchQuery, onItemPress }: AllWalletsSearchP
|
|
|
36
41
|
await ApiController.searchWallet({ search: searchQuery });
|
|
37
42
|
setLoading(false);
|
|
38
43
|
} catch (error) {
|
|
44
|
+
LogController.sendError(error, 'AllWalletsSearch.tsx', 'searchFetch');
|
|
39
45
|
SnackController.showError('Failed to load wallets');
|
|
40
46
|
setLoading(false);
|
|
41
47
|
setLoadingError(true);
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
OptionsController,
|
|
11
11
|
EventsController,
|
|
12
12
|
ConstantsUtil,
|
|
13
|
-
AssetController
|
|
13
|
+
AssetController,
|
|
14
|
+
LogController
|
|
14
15
|
} from '@reown/appkit-core-react-native';
|
|
15
16
|
import {
|
|
16
17
|
Button,
|
|
@@ -85,6 +86,7 @@ export function ConnectingMobile({ onRetry, onCopyUri, isInstalled }: Props) {
|
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
} catch (error: any) {
|
|
89
|
+
LogController.sendError(error, 'ConnectingMobile.tsx', 'onConnect');
|
|
88
90
|
if (error.message.includes(ConstantsUtil.LINKING_ERROR)) {
|
|
89
91
|
setErrorType('not_installed');
|
|
90
92
|
} else {
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
CoreHelperUtil,
|
|
10
10
|
OptionsController,
|
|
11
11
|
EventsController,
|
|
12
|
-
AssetController
|
|
12
|
+
AssetController,
|
|
13
|
+
LogController
|
|
13
14
|
} from '@reown/appkit-core-react-native';
|
|
14
15
|
import {
|
|
15
16
|
Button,
|
|
@@ -61,7 +62,9 @@ export function ConnectingWeb({ onCopyUri }: ConnectingWebProps) {
|
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
|
-
} catch {
|
|
65
|
+
} catch (error) {
|
|
66
|
+
LogController.sendError(error, 'ConnectingWeb.tsx', 'onConnect');
|
|
67
|
+
}
|
|
65
68
|
}, [data?.wallet, wcUri]);
|
|
66
69
|
|
|
67
70
|
return (
|
package/src/types.ts
CHANGED
|
@@ -129,6 +129,7 @@ export interface AppKitConfig {
|
|
|
129
129
|
/**
|
|
130
130
|
* Optional flag to enable debug mode.
|
|
131
131
|
* When enabled, additional logging and debugging information will be output.
|
|
132
|
+
* Only enabled in development mode.
|
|
132
133
|
*
|
|
133
134
|
* @see {@link https://docs.reown.com/appkit/react-native/core/options#debug | Debug Documentation}
|
|
134
135
|
* @default false
|
package/src/utils/SIWXUtil.ts
CHANGED
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
SnackController,
|
|
14
14
|
CoreHelperUtil,
|
|
15
15
|
ConnectionsController,
|
|
16
|
-
EventsController
|
|
16
|
+
EventsController,
|
|
17
|
+
LogController
|
|
17
18
|
} from '@reown/appkit-core-react-native';
|
|
18
19
|
import { Alert } from 'react-native';
|
|
19
20
|
|
|
@@ -74,8 +75,7 @@ export const SIWXUtil = {
|
|
|
74
75
|
ModalController.open({ view: 'SIWXSignMessage' });
|
|
75
76
|
}
|
|
76
77
|
} catch (error: unknown) {
|
|
77
|
-
|
|
78
|
-
console.error('SIWXUtil:initializeIfEnabled error', error);
|
|
78
|
+
LogController.sendError(error, 'SIWXUtil.ts', 'initializeIfEnabled');
|
|
79
79
|
|
|
80
80
|
EventsController.sendEvent({
|
|
81
81
|
type: 'track',
|
|
@@ -138,6 +138,8 @@ export const SIWXUtil = {
|
|
|
138
138
|
signature
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
+
SnackController.hide();
|
|
142
|
+
|
|
141
143
|
ModalController.close();
|
|
142
144
|
|
|
143
145
|
EventsController.sendEvent({
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
OnRampController,
|
|
15
15
|
ConnectionsController,
|
|
16
16
|
AssetController,
|
|
17
|
-
AssetUtil
|
|
17
|
+
AssetUtil,
|
|
18
|
+
LogController
|
|
18
19
|
} from '@reown/appkit-core-react-native';
|
|
19
20
|
// import { ConstantsUtil as CommonConstantsUtil } from '@reown/appkit-common-react-native';
|
|
20
21
|
import {
|
|
@@ -94,6 +95,7 @@ export function AccountDefaultView() {
|
|
|
94
95
|
switchAccountType(namespace, newType, network);
|
|
95
96
|
}
|
|
96
97
|
} catch (error) {
|
|
98
|
+
LogController.sendError(error, 'AccountDefaultView.tsx', 'onSwitchAccountType');
|
|
97
99
|
SnackController.showError('Error switching account type');
|
|
98
100
|
}
|
|
99
101
|
};
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
WcController,
|
|
9
9
|
AssetUtil,
|
|
10
10
|
AssetController,
|
|
11
|
-
CoreHelperUtil
|
|
11
|
+
CoreHelperUtil,
|
|
12
|
+
LogController
|
|
12
13
|
} from '@reown/appkit-core-react-native';
|
|
13
14
|
import {
|
|
14
15
|
Button,
|
|
@@ -72,6 +73,7 @@ export function ConnectingExternalView() {
|
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
75
|
} catch (error) {
|
|
76
|
+
LogController.sendError(error, 'ConnectingExternalView.tsx', 'onConnect');
|
|
75
77
|
if (/(Wallet not found)/i.test((error as Error).message)) {
|
|
76
78
|
setErrorType('not_installed');
|
|
77
79
|
} else if (/(rejected)/i.test((error as Error).message)) {
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
CoreHelperUtil,
|
|
6
6
|
EventsController,
|
|
7
7
|
RouterController,
|
|
8
|
-
SnackController
|
|
8
|
+
SnackController,
|
|
9
|
+
LogController
|
|
9
10
|
} from '@reown/appkit-core-react-native';
|
|
10
11
|
import {
|
|
11
12
|
FlexView,
|
|
@@ -48,6 +49,7 @@ export function ConnectingSocialView() {
|
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
} catch (e) {
|
|
52
|
+
LogController.sendError(e, 'ConnectingSocialView.tsx', 'onConnect');
|
|
51
53
|
EventsController.sendEvent({
|
|
52
54
|
type: 'track',
|
|
53
55
|
event: 'SOCIAL_LOGIN_ERROR',
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
SnackController,
|
|
10
10
|
OptionsController,
|
|
11
11
|
ApiController,
|
|
12
|
-
EventsController
|
|
12
|
+
EventsController,
|
|
13
|
+
LogController
|
|
13
14
|
} from '@reown/appkit-core-react-native';
|
|
14
15
|
import { useInternalAppKit } from '../../AppKitContext';
|
|
15
16
|
import { ConnectingQrCode } from '../../partials/w3m-connecting-qrcode';
|
|
@@ -51,6 +52,7 @@ export function ConnectingView() {
|
|
|
51
52
|
WcController.setWcPromise(connectPromise);
|
|
52
53
|
}
|
|
53
54
|
} catch (error) {
|
|
55
|
+
LogController.sendError(error, 'ConnectingView.tsx', 'initializeConnection');
|
|
54
56
|
WcController.setWcError(true);
|
|
55
57
|
WcController.clearUri();
|
|
56
58
|
SnackController.showError('Declined');
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
ApiController,
|
|
5
5
|
AssetController,
|
|
6
6
|
AssetUtil,
|
|
7
|
+
LogController,
|
|
7
8
|
RouterController
|
|
8
9
|
} from '@reown/appkit-core-react-native';
|
|
9
10
|
import {
|
|
@@ -35,6 +36,7 @@ export function NetworkSwitchView() {
|
|
|
35
36
|
await switchNetwork(RouterController.state.data.network);
|
|
36
37
|
back();
|
|
37
38
|
} catch (error) {
|
|
39
|
+
LogController.sendError(error, 'NetworkSwitchView.tsx', 'onSwitchNetwork');
|
|
38
40
|
setIsError(true);
|
|
39
41
|
setShowRetry(true);
|
|
40
42
|
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from '@reown/appkit-ui-react-native';
|
|
12
12
|
import {
|
|
13
13
|
ConnectionsController,
|
|
14
|
+
LogController,
|
|
14
15
|
OptionsController,
|
|
15
16
|
RouterController,
|
|
16
17
|
SnackController
|
|
@@ -37,6 +38,7 @@ export function SIWXSignMessageView() {
|
|
|
37
38
|
try {
|
|
38
39
|
await SIWXUtil.requestSignMessage();
|
|
39
40
|
} catch (error) {
|
|
41
|
+
LogController.sendError(error, 'SIWXSignMessageView.tsx', 'onSign');
|
|
40
42
|
SnackController.showError('Signature declined');
|
|
41
43
|
} finally {
|
|
42
44
|
setIsSigning(false);
|