@reown/appkit-react-native 0.0.0-feat-multichain-20250930155416 → 0.0.0-feat-multichain-20251002171622
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 +87 -9
- package/lib/commonjs/AppKit.js.map +1 -1
- package/lib/commonjs/hooks/useAppKit.js.map +1 -1
- package/lib/commonjs/index.js +1 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js +1 -1
- package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletItem.js +2 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletItem.js.map +1 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js +3 -1
- package/lib/commonjs/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js +20 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +5 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +5 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/utils/SIWXUtil.js +3 -6
- package/lib/commonjs/utils/SIWXUtil.js.map +1 -1
- package/lib/commonjs/views/w3m-account-default-view/index.js +2 -2
- package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js +5 -2
- package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js +5 -3
- package/lib/commonjs/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/index.js +5 -2
- package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +20 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/index.js +1 -1
- package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js +1 -1
- package/lib/commonjs/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
- package/lib/module/AppKit.js +87 -9
- package/lib/module/AppKit.js.map +1 -1
- package/lib/module/hooks/useAppKit.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/partials/w3m-account-wallet-features/index.js +1 -1
- package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/components/WalletItem.js +2 -1
- package/lib/module/partials/w3m-all-wallets-list/components/WalletItem.js.map +1 -1
- package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js +3 -1
- package/lib/module/partials/w3m-all-wallets-list/components/WalletList.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/index.js +21 -2
- package/lib/module/partials/w3m-connecting-mobile/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/index.js +6 -2
- package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +6 -2
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/utils/SIWXUtil.js +3 -6
- package/lib/module/utils/SIWXUtil.js.map +1 -1
- package/lib/module/views/w3m-account-default-view/index.js +2 -2
- package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js +5 -2
- package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js +5 -3
- package/lib/module/views/w3m-connect-view/components/all-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/index.js +5 -2
- package/lib/module/views/w3m-connect-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +21 -2
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/views/w3m-swap-view/index.js +1 -1
- package/lib/module/views/w3m-swap-view/index.js.map +1 -1
- package/lib/module/views/w3m-what-is-a-wallet-view/index.js +1 -1
- package/lib/module/views/w3m-what-is-a-wallet-view/index.js.map +1 -1
- package/lib/typescript/AppKit.d.ts +12 -1
- package/lib/typescript/AppKit.d.ts.map +1 -1
- package/lib/typescript/AppKitContext.d.ts +1 -1
- package/lib/typescript/hooks/useAccount.d.ts +1 -1
- package/lib/typescript/hooks/useAppKit.d.ts +2 -1
- package/lib/typescript/hooks/useAppKit.d.ts.map +1 -1
- package/lib/typescript/hooks/useAppKitEvents.d.ts +69 -17
- package/lib/typescript/hooks/useAppKitEvents.d.ts.map +1 -1
- package/lib/typescript/hooks/useAppKitState.d.ts +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletItem.d.ts +3 -2
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletItem.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletList.d.ts +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/components/WalletList.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-all-wallets-list/index.d.ts +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 +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-qrcode/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-web/index.d.ts.map +1 -1
- package/lib/typescript/utils/SIWXUtil.d.ts +1 -1
- package/lib/typescript/utils/SIWXUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts +1 -1
- package/lib/typescript/views/w3m-connect-view/components/all-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/AppKit.ts +102 -9
- package/src/hooks/useAppKit.ts +3 -2
- package/src/index.ts +2 -0
- package/src/partials/w3m-account-wallet-features/index.tsx +1 -1
- package/src/partials/w3m-all-wallets-list/components/WalletItem.tsx +11 -3
- package/src/partials/w3m-all-wallets-list/components/WalletList.tsx +3 -2
- package/src/partials/w3m-all-wallets-list/index.tsx +1 -1
- package/src/partials/w3m-all-wallets-search/index.tsx +1 -1
- package/src/partials/w3m-connecting-mobile/index.tsx +22 -2
- package/src/partials/w3m-connecting-qrcode/index.tsx +8 -2
- package/src/partials/w3m-connecting-web/index.tsx +7 -2
- package/src/utils/SIWXUtil.ts +3 -8
- package/src/views/w3m-account-default-view/index.tsx +2 -2
- package/src/views/w3m-all-wallets-view/index.tsx +9 -2
- package/src/views/w3m-connect-view/components/all-wallet-list.tsx +6 -4
- package/src/views/w3m-connect-view/index.tsx +5 -2
- package/src/views/w3m-connecting-external-view/index.tsx +22 -2
- package/src/views/w3m-swap-view/index.tsx +1 -1
- package/src/views/w3m-what-is-a-wallet-view/index.tsx +1 -1
|
@@ -21,7 +21,7 @@ export function AccountWalletFeatures() {
|
|
|
21
21
|
const { features, isOnRampEnabled } = useSnapshot(OptionsController.state);
|
|
22
22
|
const { activeNetwork, balances, activeNamespace } = useSnapshot(ConnectionsController.state);
|
|
23
23
|
const balance = CoreHelperUtil.calculateAndFormatBalance(balances as BalanceType[]);
|
|
24
|
-
const network = ConnectionsController.state.activeNetwork?.caipNetworkId
|
|
24
|
+
const network = ConnectionsController.state.activeNetwork?.caipNetworkId;
|
|
25
25
|
const isSmartAccount = ConnectionsController.state.accountType === 'smartAccount';
|
|
26
26
|
const showSend =
|
|
27
27
|
activeNamespace && ConstantsUtil.SEND_SUPPORTED_NAMESPACES.includes(activeNamespace);
|
|
@@ -7,13 +7,21 @@ import { memo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
interface WalletItemProps {
|
|
9
9
|
item: WcWallet;
|
|
10
|
+
displayIndex: number;
|
|
10
11
|
imageHeaders?: Record<string, string>;
|
|
11
|
-
onItemPress: (wallet: WcWallet) => void;
|
|
12
|
+
onItemPress: (wallet: WcWallet, displayIndex: number) => void;
|
|
12
13
|
style?: StyleProp<ViewStyle>;
|
|
13
14
|
testID?: string;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export function WalletItem({
|
|
17
|
+
export function WalletItem({
|
|
18
|
+
item,
|
|
19
|
+
displayIndex,
|
|
20
|
+
imageHeaders,
|
|
21
|
+
onItemPress,
|
|
22
|
+
style,
|
|
23
|
+
testID
|
|
24
|
+
}: WalletItemProps) {
|
|
17
25
|
const { walletImages } = useSnapshot(AssetController.state);
|
|
18
26
|
const isInstalled = ApiController.state.installed.find(wallet => wallet?.id === item?.id);
|
|
19
27
|
const imageSrc = AssetUtil.getWalletImage(item, walletImages);
|
|
@@ -28,7 +36,7 @@ export function WalletItem({ item, imageHeaders, onItemPress, style, testID }: W
|
|
|
28
36
|
style={style}
|
|
29
37
|
imageHeaders={imageHeaders}
|
|
30
38
|
name={item?.name ?? 'Unknown'}
|
|
31
|
-
onPress={() => onItemPress(item)}
|
|
39
|
+
onPress={() => onItemPress(item, displayIndex)}
|
|
32
40
|
installed={!!isInstalled}
|
|
33
41
|
testID={testID}
|
|
34
42
|
/>
|
|
@@ -18,7 +18,7 @@ const ITEM_HEIGHT_WITH_GAP = ITEM_HEIGHT + Spacing['3xs'];
|
|
|
18
18
|
|
|
19
19
|
interface Props {
|
|
20
20
|
data: WcWallet[];
|
|
21
|
-
onItemPress: (wallet: WcWallet) => void;
|
|
21
|
+
onItemPress: (wallet: WcWallet, displayIndex: number) => void;
|
|
22
22
|
onEndReached?: () => void;
|
|
23
23
|
onEndReachedThreshold?: number;
|
|
24
24
|
isLoading?: boolean;
|
|
@@ -52,7 +52,7 @@ export function WalletList({
|
|
|
52
52
|
data={displayData}
|
|
53
53
|
style={[styles.list, { height: maxHeight }, style]}
|
|
54
54
|
columnWrapperStyle={styles.columnWrapperStyle}
|
|
55
|
-
renderItem={({ item }) => {
|
|
55
|
+
renderItem={({ item, index }) => {
|
|
56
56
|
if (isLoading) {
|
|
57
57
|
return <CardSelectLoader style={styles.itemContainer} />;
|
|
58
58
|
}
|
|
@@ -61,6 +61,7 @@ export function WalletList({
|
|
|
61
61
|
<WalletItem
|
|
62
62
|
item={item}
|
|
63
63
|
imageHeaders={imageHeaders}
|
|
64
|
+
displayIndex={index}
|
|
64
65
|
onItemPress={onItemPress}
|
|
65
66
|
style={styles.itemContainer}
|
|
66
67
|
testID={testIDKey ? `${testIDKey}-${item?.id}` : undefined}
|
|
@@ -15,7 +15,7 @@ import { Loading } from './components/Loading';
|
|
|
15
15
|
import { WalletList } from './components/WalletList';
|
|
16
16
|
|
|
17
17
|
interface AllWalletsListProps {
|
|
18
|
-
onItemPress: (wallet: WcWallet) => void;
|
|
18
|
+
onItemPress: (wallet: WcWallet, displayIndex: number) => void;
|
|
19
19
|
headerHeight?: number;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@ import { Loading } from '../w3m-all-wallets-list/components/Loading';
|
|
|
15
15
|
import { WalletList } from '../w3m-all-wallets-list/components/WalletList';
|
|
16
16
|
|
|
17
17
|
export interface AllWalletsSearchProps {
|
|
18
|
-
onItemPress: (wallet: WcWallet) => void;
|
|
18
|
+
onItemPress: (wallet: WcWallet, displayIndex: number) => void;
|
|
19
19
|
searchQuery?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
EventsController,
|
|
12
12
|
ConstantsUtil,
|
|
13
13
|
AssetController,
|
|
14
|
-
LogController
|
|
14
|
+
LogController,
|
|
15
|
+
ConnectionsController
|
|
15
16
|
} from '@reown/appkit-core-react-native';
|
|
16
17
|
import {
|
|
17
18
|
Button,
|
|
@@ -61,6 +62,21 @@ export function ConnectingMobile({ onRetry, onCopyUri, isInstalled }: Props) {
|
|
|
61
62
|
const onStorePress = () => {
|
|
62
63
|
if (storeUrl) {
|
|
63
64
|
CoreHelperUtil.openLink(storeUrl);
|
|
65
|
+
EventsController.sendEvent({
|
|
66
|
+
type: 'track',
|
|
67
|
+
event: 'GET_WALLET',
|
|
68
|
+
properties: {
|
|
69
|
+
name: data?.wallet?.name ?? 'Unknown',
|
|
70
|
+
link: storeUrl,
|
|
71
|
+
linkType: Platform.select({
|
|
72
|
+
ios: 'appstore',
|
|
73
|
+
android: 'playstore',
|
|
74
|
+
default: undefined
|
|
75
|
+
}),
|
|
76
|
+
explorerId: data?.wallet?.id,
|
|
77
|
+
walletRank: data?.wallet?.order
|
|
78
|
+
}
|
|
79
|
+
});
|
|
64
80
|
}
|
|
65
81
|
};
|
|
66
82
|
|
|
@@ -75,13 +91,17 @@ export function ConnectingMobile({ onRetry, onCopyUri, isInstalled }: Props) {
|
|
|
75
91
|
await CoreHelperUtil.openLink(redirect);
|
|
76
92
|
await WcController.state.wcPromise;
|
|
77
93
|
WcController.setConnectedWallet(wcLinking, data?.wallet);
|
|
94
|
+
const address = ConnectionsController.state.activeAddress;
|
|
95
|
+
const caipNetworkId = ConnectionsController.state.activeNetwork?.caipNetworkId;
|
|
78
96
|
EventsController.sendEvent({
|
|
79
97
|
type: 'track',
|
|
80
98
|
event: 'CONNECT_SUCCESS',
|
|
99
|
+
address: CoreHelperUtil.getPlainAddress(address),
|
|
81
100
|
properties: {
|
|
82
101
|
method: 'mobile',
|
|
83
102
|
name: data?.wallet?.name ?? 'Unknown',
|
|
84
|
-
|
|
103
|
+
explorerId: data?.wallet?.id,
|
|
104
|
+
caipNetworkId
|
|
85
105
|
}
|
|
86
106
|
});
|
|
87
107
|
}
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
WcController,
|
|
5
5
|
EventsController,
|
|
6
6
|
OptionsController,
|
|
7
|
-
SnackController
|
|
7
|
+
SnackController,
|
|
8
|
+
ConnectionsController,
|
|
9
|
+
CoreHelperUtil
|
|
8
10
|
} from '@reown/appkit-core-react-native';
|
|
9
11
|
import {
|
|
10
12
|
FlexView,
|
|
@@ -35,13 +37,17 @@ export function ConnectingQrCode() {
|
|
|
35
37
|
|
|
36
38
|
const onConnect = async () => {
|
|
37
39
|
await WcController.state.wcPromise;
|
|
40
|
+
const address = ConnectionsController.state.activeAddress;
|
|
41
|
+
const caipNetworkId = ConnectionsController.state.activeNetwork?.caipNetworkId;
|
|
38
42
|
|
|
39
43
|
EventsController.sendEvent({
|
|
40
44
|
type: 'track',
|
|
41
45
|
event: 'CONNECT_SUCCESS',
|
|
46
|
+
address: CoreHelperUtil.getPlainAddress(address),
|
|
42
47
|
properties: {
|
|
43
48
|
method: 'qrcode',
|
|
44
|
-
name: 'WalletConnect'
|
|
49
|
+
name: 'WalletConnect',
|
|
50
|
+
caipNetworkId
|
|
45
51
|
}
|
|
46
52
|
});
|
|
47
53
|
};
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
OptionsController,
|
|
11
11
|
EventsController,
|
|
12
12
|
AssetController,
|
|
13
|
-
LogController
|
|
13
|
+
LogController,
|
|
14
|
+
ConnectionsController
|
|
14
15
|
} from '@reown/appkit-core-react-native';
|
|
15
16
|
import {
|
|
16
17
|
Button,
|
|
@@ -51,14 +52,18 @@ export function ConnectingWeb({ onCopyUri }: ConnectingWebProps) {
|
|
|
51
52
|
await Linking.openURL(redirect);
|
|
52
53
|
await WcController.state.wcPromise;
|
|
53
54
|
WcController.setConnectedWallet(wcLinking, data?.wallet);
|
|
55
|
+
const address = ConnectionsController.state.activeAddress;
|
|
56
|
+
const caipNetworkId = ConnectionsController.state.activeNetwork?.caipNetworkId;
|
|
54
57
|
|
|
55
58
|
EventsController.sendEvent({
|
|
56
59
|
type: 'track',
|
|
57
60
|
event: 'CONNECT_SUCCESS',
|
|
61
|
+
address: CoreHelperUtil.getPlainAddress(address),
|
|
58
62
|
properties: {
|
|
59
63
|
method: 'web',
|
|
60
64
|
name: data?.wallet?.name ?? 'Unknown',
|
|
61
|
-
|
|
65
|
+
explorerId: data?.wallet?.id,
|
|
66
|
+
caipNetworkId
|
|
62
67
|
}
|
|
63
68
|
});
|
|
64
69
|
}
|
package/src/utils/SIWXUtil.ts
CHANGED
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
EventsController,
|
|
17
17
|
LogController
|
|
18
18
|
} from '@reown/appkit-core-react-native';
|
|
19
|
-
import { Alert } from 'react-native';
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* SIWXUtil holds the methods to interact with the SIWX plugin and must be called internally on AppKit.
|
|
@@ -153,10 +152,7 @@ export const SIWXUtil = {
|
|
|
153
152
|
view: 'SIWXSignMessage'
|
|
154
153
|
});
|
|
155
154
|
}
|
|
156
|
-
|
|
157
|
-
// @ts-ignore
|
|
158
|
-
Alert.alert('Error signing message', error?.message ?? error);
|
|
159
|
-
|
|
155
|
+
SnackController.hide();
|
|
160
156
|
SnackController.showError('Error signing message');
|
|
161
157
|
EventsController.sendEvent({
|
|
162
158
|
type: 'track',
|
|
@@ -293,8 +289,6 @@ export const SIWXUtil = {
|
|
|
293
289
|
universalLink
|
|
294
290
|
);
|
|
295
291
|
|
|
296
|
-
SnackController.showLoading('Authenticating...', true);
|
|
297
|
-
|
|
298
292
|
if (result?.auths?.length) {
|
|
299
293
|
const sessions = result.auths.map<SIWXSession>(cacao => {
|
|
300
294
|
const message = universalProvider.client.formatAuthMessage({
|
|
@@ -320,6 +314,7 @@ export const SIWXUtil = {
|
|
|
320
314
|
});
|
|
321
315
|
|
|
322
316
|
try {
|
|
317
|
+
SnackController.showLoading('Authenticating...', true);
|
|
323
318
|
await siwx.setSessions(sessions);
|
|
324
319
|
|
|
325
320
|
EventsController.sendEvent({
|
|
@@ -349,7 +344,7 @@ export const SIWXUtil = {
|
|
|
349
344
|
},
|
|
350
345
|
getSIWXEventProperties(error?: unknown) {
|
|
351
346
|
return {
|
|
352
|
-
network: ConnectionsController.state.activeNetwork?.caipNetworkId
|
|
347
|
+
network: ConnectionsController.state.activeNetwork?.caipNetworkId,
|
|
353
348
|
isSmartAccount: ConnectionsController.state.accountType === 'smartAccount',
|
|
354
349
|
message: error ? CoreHelperUtil.parseError(error) : undefined
|
|
355
350
|
};
|
|
@@ -122,7 +122,7 @@ export function AccountDefaultView() {
|
|
|
122
122
|
type: 'track',
|
|
123
123
|
event: 'OPEN_SWAP',
|
|
124
124
|
properties: {
|
|
125
|
-
network: ConnectionsController.state.activeNetwork?.caipNetworkId
|
|
125
|
+
network: ConnectionsController.state.activeNetwork?.caipNetworkId,
|
|
126
126
|
isSmartAccount: false
|
|
127
127
|
}
|
|
128
128
|
});
|
|
@@ -158,7 +158,7 @@ export function AccountDefaultView() {
|
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
const onSendPress = () => {
|
|
161
|
-
const network = ConnectionsController.state.activeNetwork?.caipNetworkId
|
|
161
|
+
const network = ConnectionsController.state.activeNetwork?.caipNetworkId;
|
|
162
162
|
const isSmartAccount = ConnectionsController.state.accountType === 'smartAccount';
|
|
163
163
|
|
|
164
164
|
EventsController.sendEvent({
|
|
@@ -22,7 +22,7 @@ export function AllWalletsView() {
|
|
|
22
22
|
|
|
23
23
|
const { debouncedCallback: onInputChange } = useDebounceCallback({ callback: setSearchQuery });
|
|
24
24
|
|
|
25
|
-
const onWalletPress = (wallet: WcWallet) => {
|
|
25
|
+
const onWalletPress = (wallet: WcWallet, displayIndex: number) => {
|
|
26
26
|
const isExternal = WcHelpersUtil.isExternalWallet(wallet);
|
|
27
27
|
if (isExternal) {
|
|
28
28
|
RouterController.push('ConnectingExternal', { wallet });
|
|
@@ -33,7 +33,14 @@ export function AllWalletsView() {
|
|
|
33
33
|
EventsController.sendEvent({
|
|
34
34
|
type: 'track',
|
|
35
35
|
event: 'SELECT_WALLET',
|
|
36
|
-
properties: {
|
|
36
|
+
properties: {
|
|
37
|
+
name: wallet.name ?? 'Unknown',
|
|
38
|
+
platform: 'mobile',
|
|
39
|
+
explorerId: wallet.id,
|
|
40
|
+
walletRank: wallet.order,
|
|
41
|
+
displayIndex,
|
|
42
|
+
view: 'AllWallets'
|
|
43
|
+
}
|
|
37
44
|
});
|
|
38
45
|
};
|
|
39
46
|
|
|
@@ -14,7 +14,7 @@ import { UiUtil } from '../../../utils/UiUtil';
|
|
|
14
14
|
|
|
15
15
|
interface Props {
|
|
16
16
|
itemStyle: StyleProp<ViewStyle>;
|
|
17
|
-
onWalletPress: (wallet: WcWallet) => void;
|
|
17
|
+
onWalletPress: (wallet: WcWallet, displayIndex: number, isInstalled?: boolean) => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export function AllWalletList({ itemStyle, onWalletPress }: Props) {
|
|
@@ -47,8 +47,10 @@ export function AllWalletList({ itemStyle, onWalletPress }: Props) {
|
|
|
47
47
|
<ListItemLoader style={itemStyle} />
|
|
48
48
|
</>
|
|
49
49
|
) : (
|
|
50
|
-
list.map(wallet => {
|
|
50
|
+
list.map((wallet, index) => {
|
|
51
51
|
const isRecent = recentWallets?.some(recentWallet => recentWallet.id === wallet.id);
|
|
52
|
+
//eslint-disable-next-line valtio/state-snapshot-rule
|
|
53
|
+
const isInstalled = !!installed.find(installedWallet => installedWallet.id === wallet.id);
|
|
52
54
|
|
|
53
55
|
return (
|
|
54
56
|
<ListWallet
|
|
@@ -56,11 +58,11 @@ export function AllWalletList({ itemStyle, onWalletPress }: Props) {
|
|
|
56
58
|
imageSrc={AssetUtil.getWalletImage(wallet, walletImages)}
|
|
57
59
|
imageHeaders={imageHeaders}
|
|
58
60
|
name={wallet?.name ?? 'Unknown'}
|
|
59
|
-
onPress={() => onWalletPress(wallet)}
|
|
61
|
+
onPress={() => onWalletPress(wallet, index, isInstalled)}
|
|
60
62
|
tagLabel={isRecent ? 'Recent' : undefined}
|
|
61
63
|
tagVariant={isRecent ? 'shade' : undefined}
|
|
62
64
|
style={itemStyle}
|
|
63
|
-
installed={
|
|
65
|
+
installed={isInstalled}
|
|
64
66
|
/>
|
|
65
67
|
);
|
|
66
68
|
})
|
|
@@ -33,7 +33,7 @@ export function ConnectView() {
|
|
|
33
33
|
const showLoadingError = !showConnectWalletsButton && prefetchError;
|
|
34
34
|
const showList = !showConnectWalletsButton && !showLoadingError;
|
|
35
35
|
|
|
36
|
-
const onWalletPress = (wallet: WcWallet, isInstalled?: boolean) => {
|
|
36
|
+
const onWalletPress = (wallet: WcWallet, displayIndex: number, isInstalled?: boolean) => {
|
|
37
37
|
const isExternal = WcHelpersUtil.isExternalWallet(wallet);
|
|
38
38
|
if (isExternal) {
|
|
39
39
|
RouterController.push('ConnectingExternal', { wallet });
|
|
@@ -48,7 +48,10 @@ export function ConnectView() {
|
|
|
48
48
|
properties: {
|
|
49
49
|
name: wallet.name ?? 'Unknown',
|
|
50
50
|
platform,
|
|
51
|
-
|
|
51
|
+
explorerId: wallet.id,
|
|
52
|
+
walletRank: wallet.order,
|
|
53
|
+
displayIndex,
|
|
54
|
+
view: 'Connect'
|
|
52
55
|
}
|
|
53
56
|
});
|
|
54
57
|
};
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
AssetUtil,
|
|
10
10
|
AssetController,
|
|
11
11
|
CoreHelperUtil,
|
|
12
|
-
LogController
|
|
12
|
+
LogController,
|
|
13
|
+
ConnectionsController
|
|
13
14
|
} from '@reown/appkit-core-react-native';
|
|
14
15
|
import {
|
|
15
16
|
Button,
|
|
@@ -42,6 +43,21 @@ export function ConnectingExternalView() {
|
|
|
42
43
|
const onStorePress = () => {
|
|
43
44
|
if (storeUrl) {
|
|
44
45
|
CoreHelperUtil.openLink(storeUrl);
|
|
46
|
+
EventsController.sendEvent({
|
|
47
|
+
type: 'track',
|
|
48
|
+
event: 'GET_WALLET',
|
|
49
|
+
properties: {
|
|
50
|
+
name: RouterController.state.data?.wallet?.name ?? 'Unknown',
|
|
51
|
+
link: storeUrl,
|
|
52
|
+
linkType: Platform.select({
|
|
53
|
+
ios: 'appstore',
|
|
54
|
+
android: 'playstore',
|
|
55
|
+
default: undefined
|
|
56
|
+
}),
|
|
57
|
+
explorerId: RouterController.state.data?.wallet?.id,
|
|
58
|
+
walletRank: RouterController.state.data?.wallet?.order
|
|
59
|
+
}
|
|
60
|
+
});
|
|
45
61
|
}
|
|
46
62
|
};
|
|
47
63
|
|
|
@@ -62,13 +78,17 @@ export function ConnectingExternalView() {
|
|
|
62
78
|
}
|
|
63
79
|
WcController.addRecentWallet(wallet);
|
|
64
80
|
WcController.setPressedWallet(wallet);
|
|
81
|
+
const address = ConnectionsController.state.activeAddress;
|
|
82
|
+
const caipNetworkId = ConnectionsController.state.activeNetwork?.caipNetworkId;
|
|
65
83
|
EventsController.sendEvent({
|
|
66
84
|
type: 'track',
|
|
67
85
|
event: 'CONNECT_SUCCESS',
|
|
86
|
+
address: CoreHelperUtil.getPlainAddress(address),
|
|
68
87
|
properties: {
|
|
69
88
|
name: wallet?.name ?? 'Unknown',
|
|
70
89
|
method: 'mobile',
|
|
71
|
-
|
|
90
|
+
caipNetworkId,
|
|
91
|
+
explorerId: wallet?.id
|
|
72
92
|
}
|
|
73
93
|
});
|
|
74
94
|
}
|
|
@@ -93,7 +93,7 @@ export function SwapView() {
|
|
|
93
93
|
type: 'track',
|
|
94
94
|
event: 'INITIATE_SWAP',
|
|
95
95
|
properties: {
|
|
96
|
-
network: ConnectionsController.state.activeNetwork?.caipNetworkId
|
|
96
|
+
network: ConnectionsController.state.activeNetwork?.caipNetworkId,
|
|
97
97
|
swapFromToken: SwapController.state.sourceToken?.symbol || '',
|
|
98
98
|
swapToToken: SwapController.state.toToken?.symbol || '',
|
|
99
99
|
swapFromAmount: SwapController.state.sourceTokenAmount || '',
|
|
@@ -8,7 +8,7 @@ export function WhatIsAWalletView() {
|
|
|
8
8
|
|
|
9
9
|
const onGetWalletPress = () => {
|
|
10
10
|
RouterController.push('GetWallet');
|
|
11
|
-
EventsController.sendEvent({ type: 'track', event: '
|
|
11
|
+
EventsController.sendEvent({ type: 'track', event: 'CLICK_GET_WALLET_HELP' });
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
return (
|