@reown/appkit-react-native 0.0.0-feat-multichain-20250902153701 → 0.0.0-feat-multichain-20250903180809
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/connectors/WalletConnectConnector.js +6 -3
- package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/styles.js +2 -1
- package/lib/commonjs/partials/w3m-connecting-mobile/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/index.js +1 -0
- package/lib/commonjs/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-web/styles.js +3 -0
- package/lib/commonjs/partials/w3m-connecting-web/styles.js.map +1 -1
- package/lib/commonjs/partials/w3m-header/index.js +2 -2
- package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/styles.js +2 -1
- package/lib/commonjs/views/w3m-connecting-external-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-siwe-view/index.js +55 -54
- package/lib/commonjs/views/w3m-connecting-siwe-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-siwe-view/styles.js +3 -7
- package/lib/commonjs/views/w3m-connecting-siwe-view/styles.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-social-view/styles.js +3 -0
- package/lib/commonjs/views/w3m-connecting-social-view/styles.js.map +1 -1
- package/lib/commonjs/views/w3m-swap-view/components/select-token-modal/index.js +1 -2
- package/lib/commonjs/views/w3m-swap-view/components/select-token-modal/index.js.map +1 -1
- package/lib/module/connectors/WalletConnectConnector.js +6 -3
- package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
- package/lib/module/partials/w3m-connecting-mobile/styles.js +2 -1
- package/lib/module/partials/w3m-connecting-mobile/styles.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/index.js +1 -0
- package/lib/module/partials/w3m-connecting-web/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-web/styles.js +3 -0
- package/lib/module/partials/w3m-connecting-web/styles.js.map +1 -1
- package/lib/module/partials/w3m-header/index.js +2 -2
- package/lib/module/partials/w3m-header/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/styles.js +2 -1
- package/lib/module/views/w3m-connecting-external-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connecting-siwe-view/index.js +56 -55
- package/lib/module/views/w3m-connecting-siwe-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-siwe-view/styles.js +3 -7
- package/lib/module/views/w3m-connecting-siwe-view/styles.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/index.js +1 -0
- package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-social-view/styles.js +3 -0
- package/lib/module/views/w3m-connecting-social-view/styles.js.map +1 -1
- package/lib/module/views/w3m-swap-view/components/select-token-modal/index.js +1 -2
- package/lib/module/views/w3m-swap-view/components/select-token-modal/index.js.map +1 -1
- package/lib/typescript/connectors/WalletConnectConnector.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-mobile/styles.d.ts +1 -0
- package/lib/typescript/partials/w3m-connecting-mobile/styles.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-web/styles.d.ts +3 -0
- package/lib/typescript/partials/w3m-connecting-web/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-external-view/styles.d.ts +1 -0
- package/lib/typescript/views/w3m-connecting-external-view/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-siwe-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-siwe-view/styles.d.ts +3 -7
- package/lib/typescript/views/w3m-connecting-siwe-view/styles.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-social-view/styles.d.ts +3 -0
- package/lib/typescript/views/w3m-connecting-social-view/styles.d.ts.map +1 -1
- package/lib/typescript/views/w3m-swap-view/components/select-token-modal/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/connectors/WalletConnectConnector.ts +7 -4
- package/src/partials/w3m-connecting-mobile/styles.ts +2 -1
- package/src/partials/w3m-connecting-web/index.tsx +1 -1
- package/src/partials/w3m-connecting-web/styles.ts +3 -0
- package/src/partials/w3m-header/index.tsx +2 -2
- package/src/views/w3m-connecting-external-view/styles.ts +2 -1
- package/src/views/w3m-connecting-siwe-view/index.tsx +46 -42
- package/src/views/w3m-connecting-siwe-view/styles.ts +3 -7
- package/src/views/w3m-connecting-social-view/index.tsx +6 -1
- package/src/views/w3m-connecting-social-view/styles.ts +3 -0
- package/src/views/w3m-swap-view/components/select-token-modal/index.tsx +2 -4
|
@@ -207,13 +207,16 @@ export class WalletConnectConnector extends WalletConnector {
|
|
|
207
207
|
throw new Error('WalletConnectConnector: Provider not initialized. Call init() first.');
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
const provider = this.provider
|
|
210
|
+
const provider = this.provider;
|
|
211
211
|
|
|
212
212
|
if (namespace) {
|
|
213
|
-
// @ts-ignore
|
|
214
213
|
return {
|
|
215
|
-
...provider,
|
|
216
|
-
|
|
214
|
+
...this.provider,
|
|
215
|
+
connect: async (params?: any) => provider.connect(params) as Promise<any>,
|
|
216
|
+
disconnect: provider.disconnect.bind(provider),
|
|
217
|
+
on: provider.on.bind(provider),
|
|
218
|
+
off: provider.off.bind(provider),
|
|
219
|
+
request: async (args: RequestArguments, chainId?: CaipNetworkId) => {
|
|
217
220
|
const _chainId = this.getChainId(namespace);
|
|
218
221
|
|
|
219
222
|
return provider.request(args, chainId || _chainId);
|
|
@@ -65,7 +65,7 @@ export function ConnectingWeb({ onCopyUri }: ConnectingWebProps) {
|
|
|
65
65
|
}, [data?.wallet, wcUri]);
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
|
-
<ScrollView bounces={false} fadingEdgeLength={20}>
|
|
68
|
+
<ScrollView bounces={false} fadingEdgeLength={20} contentContainerStyle={styles.container}>
|
|
69
69
|
<FlexView alignItems="center" padding={['2xl', 'm', '3xl', 'm']}>
|
|
70
70
|
<LoadingThumbnail paused={wcError}>
|
|
71
71
|
<WalletImage
|
|
@@ -32,7 +32,7 @@ export function Header() {
|
|
|
32
32
|
Connect: 'Connect wallet',
|
|
33
33
|
ConnectSocials: 'All socials',
|
|
34
34
|
ConnectingExternal: walletName ?? 'Connect wallet',
|
|
35
|
-
ConnectingSiwe:
|
|
35
|
+
ConnectingSiwe: 'Sign in',
|
|
36
36
|
ConnectingSocial: socialName ?? 'Connecting Social',
|
|
37
37
|
ConnectingWalletConnect: walletName ?? 'WalletConnect',
|
|
38
38
|
GetWallet: 'Get a wallet',
|
|
@@ -58,7 +58,7 @@ export function Header() {
|
|
|
58
58
|
}[_view];
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
const noCloseViews = ['OnRampSettings'];
|
|
61
|
+
const noCloseViews = ['OnRampSettings', 'ConnectingSiwe'];
|
|
62
62
|
const noBackViews = ['UnsupportedChain'];
|
|
63
63
|
const showClose = !noCloseViews.includes(view);
|
|
64
64
|
const header = headings(data, view);
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
Button,
|
|
6
6
|
DoubleImageLoader,
|
|
7
7
|
FlexView,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Text,
|
|
9
|
+
useCustomDimensions
|
|
10
10
|
} from '@reown/appkit-ui-react-native';
|
|
11
11
|
import {
|
|
12
12
|
ConnectionsController,
|
|
@@ -20,9 +20,11 @@ import { SIWEController } from '@reown/appkit-siwe-react-native';
|
|
|
20
20
|
|
|
21
21
|
import { useInternalAppKit } from '../../AppKitContext';
|
|
22
22
|
import styles from './styles';
|
|
23
|
+
import { ScrollView } from 'react-native';
|
|
23
24
|
|
|
24
25
|
export function ConnectingSiweView() {
|
|
25
26
|
const { disconnect } = useInternalAppKit();
|
|
27
|
+
const { padding } = useCustomDimensions();
|
|
26
28
|
const { metadata } = useSnapshot(OptionsController.state);
|
|
27
29
|
const { activeAddress, identity, walletInfo } = useSnapshot(ConnectionsController.state);
|
|
28
30
|
const [isSigning, setIsSigning] = useState(false);
|
|
@@ -84,46 +86,48 @@ export function ConnectingSiweView() {
|
|
|
84
86
|
};
|
|
85
87
|
|
|
86
88
|
return (
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
89
|
+
<ScrollView
|
|
90
|
+
bounces={false}
|
|
91
|
+
fadingEdgeLength={20}
|
|
92
|
+
style={{ paddingHorizontal: padding }}
|
|
93
|
+
contentContainerStyle={styles.container}
|
|
94
|
+
>
|
|
95
|
+
<FlexView padding={['0', 's', '3xl', 's']}>
|
|
96
|
+
<DoubleImageLoader
|
|
97
|
+
style={styles.logoContainer}
|
|
98
|
+
leftImage={dappIcon}
|
|
99
|
+
rightImage={walletIcon}
|
|
100
|
+
renderRightPlaceholder={() => (
|
|
101
|
+
<Avatar imageSrc={identity?.avatar} address={activeAddress} size={60} borderWidth={0} />
|
|
102
|
+
)}
|
|
103
|
+
rightItemStyle={!walletIcon && styles.walletAvatar}
|
|
104
|
+
/>
|
|
105
|
+
<Text center variant="medium-600" color="fg-100" style={styles.title}>
|
|
106
|
+
{dappName} needs to connect to your wallet
|
|
107
|
+
</Text>
|
|
108
|
+
<Text center variant="small-400" color="fg-200" style={styles.subtitle}>
|
|
109
|
+
Sign this message to prove you own this wallet and proceed. Cancelling will disconnect you
|
|
110
|
+
</Text>
|
|
111
|
+
<FlexView flexDirection="row" justifyContent="space-between" margin={['s', '0', '0', '0']}>
|
|
112
|
+
<Button
|
|
113
|
+
variant="shade"
|
|
114
|
+
onPress={onCancel}
|
|
115
|
+
style={styles.button}
|
|
116
|
+
loading={isDisconnecting}
|
|
117
|
+
>
|
|
118
|
+
Cancel
|
|
119
|
+
</Button>
|
|
120
|
+
<Button
|
|
121
|
+
variant="fill"
|
|
122
|
+
loading={isSigning}
|
|
123
|
+
disabled={isDisconnecting}
|
|
124
|
+
onPress={onSign}
|
|
125
|
+
style={styles.button}
|
|
126
|
+
>
|
|
127
|
+
Sign
|
|
128
|
+
</Button>
|
|
129
|
+
</FlexView>
|
|
126
130
|
</FlexView>
|
|
127
|
-
</
|
|
131
|
+
</ScrollView>
|
|
128
132
|
);
|
|
129
133
|
}
|
|
@@ -2,6 +2,9 @@ import { BorderRadius, Spacing } from '@reown/appkit-ui-react-native';
|
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
minHeight: '30%'
|
|
7
|
+
},
|
|
5
8
|
logoContainer: {
|
|
6
9
|
marginTop: Spacing.xl,
|
|
7
10
|
marginBottom: Spacing.m
|
|
@@ -16,13 +19,6 @@ export default StyleSheet.create({
|
|
|
16
19
|
marginHorizontal: '10%',
|
|
17
20
|
marginVertical: Spacing.l
|
|
18
21
|
},
|
|
19
|
-
closeButton: {
|
|
20
|
-
alignSelf: 'flex-end',
|
|
21
|
-
right: Spacing.xl,
|
|
22
|
-
top: Spacing.l,
|
|
23
|
-
position: 'absolute',
|
|
24
|
-
zIndex: 2
|
|
25
|
-
},
|
|
26
22
|
walletAvatar: {
|
|
27
23
|
borderRadius: BorderRadius.full
|
|
28
24
|
}
|
|
@@ -75,7 +75,12 @@ export function ConnectingSocialView() {
|
|
|
75
75
|
}, [wcUri, onConnect]);
|
|
76
76
|
|
|
77
77
|
return (
|
|
78
|
-
<ScrollView
|
|
78
|
+
<ScrollView
|
|
79
|
+
bounces={false}
|
|
80
|
+
fadingEdgeLength={20}
|
|
81
|
+
style={{ paddingHorizontal: padding }}
|
|
82
|
+
contentContainerStyle={styles.container}
|
|
83
|
+
>
|
|
79
84
|
<FlexView alignItems="center" alignSelf="center" padding={['2xl', 'l', '2xl', 'l']}>
|
|
80
85
|
<LoadingThumbnail paused={!!error}>
|
|
81
86
|
<Logo logo={data?.socialProvider ?? 'more'} height={72} width={72} />
|
|
@@ -56,16 +56,14 @@ export function SwapSelectTokenModal({ onClose, type, style, visible }: Props) {
|
|
|
56
56
|
const [tokenSearch, setTokenSearch] = useState<string>('');
|
|
57
57
|
const isSourceToken = type === 'sourceToken';
|
|
58
58
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
);
|
|
59
|
+
const filteredTokens = createSections(isSourceToken, tokenSearch, myTokensWithBalance);
|
|
60
|
+
|
|
62
61
|
const suggestedList = suggestedTokens
|
|
63
62
|
?.filter(token => token.address !== SwapController.state.sourceToken?.address)
|
|
64
63
|
.slice(0, 8);
|
|
65
64
|
|
|
66
65
|
const onSearchChange = (value: string) => {
|
|
67
66
|
setTokenSearch(value);
|
|
68
|
-
setFilteredTokens(createSections(isSourceToken, value, myTokensWithBalance));
|
|
69
67
|
};
|
|
70
68
|
|
|
71
69
|
const onTokenPress = (token: SwapTokenWithBalance) => {
|