Skip to content

Commit 150e45c

Browse files
chore: multichain improvements (#221)
1 parent 599af0c commit 150e45c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2998
-1576
lines changed

dapps/ModalEthers/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://cloud.reown.com/
1+
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://dashboard.reown.com/

dapps/ModalUProvider/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
ENV_PROJECT_ID='YOUR_ENV_PROJECT_ID' #Get it from https://cloud.reown.com/
1+
ENV_PROJECT_ID='YOUR_ENV_PROJECT_ID' #Get it from https://dashboard.reown.com/
22
ENV_RELAY_URL=''
33
ENV_SENTRY_DSN='...'

dapps/ModalViem/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://cloud.reown.com/
1+
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://dashboard.reown.com/

dapps/W3MEthers/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://cloud.reown.com/
1+
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://dashboard.reown.com/

dapps/W3MEthers/package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,26 @@
1010
"test": "jest"
1111
},
1212
"dependencies": {
13+
"@bitcoinerlab/secp256k1": "1.2.0",
1314
"@coinbase/wallet-mobile-sdk": "1.1.2",
1415
"@react-native-async-storage/async-storage": "1.21.0",
1516
"@react-native-clipboard/clipboard": "1.13.2",
1617
"@react-native-community/netinfo": "11.2.1",
17-
"@reown/appkit-coinbase-react-native": "2.0.0-alpha.2",
18-
"@reown/appkit-ethers-react-native": "2.0.0-alpha.2",
19-
"@reown/appkit-solana-react-native": "2.0.0-alpha.2",
20-
"@reown/appkit-bitcoin-react-native": "2.0.0-alpha.2",
21-
"@reown/appkit-react-native": "2.0.0-alpha.2",
18+
"@reown/appkit-coinbase-react-native": "2.0.0-alpha.3",
19+
"@reown/appkit-ethers-react-native": "2.0.0-alpha.3",
20+
"@reown/appkit-solana-react-native": "2.0.0-alpha.3",
21+
"@reown/appkit-bitcoin-react-native": "2.0.0-alpha.3",
22+
"@reown/appkit-react-native": "2.0.0-alpha.3",
2223
"@walletconnect/react-native-compat": "2.21.5",
24+
"bitcoinjs-lib": "7.0.0-rc.0",
2325
"ethers": "6.15.0",
2426
"expo": "^50.0.0",
2527
"react": "18.2.0",
2628
"react-native": "0.73.4",
2729
"react-native-get-random-values": "1.10.0",
2830
"react-native-mmkv": "2.11.0",
29-
"react-native-modal": "14.0.0-rc.1",
3031
"react-native-svg": "14.1.0",
32+
"react-native-toast-message": "2.3.3",
3133
"text-encoding": "^0.7.0"
3234
},
3335
"devDependencies": {
@@ -68,6 +70,7 @@
6870
"tar": "^6.2.1",
6971
"send": "^0.19.0",
7072
"undici": "^6.21.2",
71-
"serve-static": "^1.16.2"
73+
"serve-static": "^1.16.2",
74+
"valtio": "2.1.5"
7275
}
7376
}

dapps/W3MEthers/src/App.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import React, {useEffect} from 'react';
55
import {Linking, SafeAreaView, StyleSheet} from 'react-native';
66
import Clipboard from '@react-native-clipboard/clipboard';
77
import {MMKV} from 'react-native-mmkv';
8+
import Toast from 'react-native-toast-message';
89

910
import {
1011
createAppKit,
@@ -30,8 +31,9 @@ import {mainnet, polygon} from './utils/ChainUtils';
3031
import {siweConfig} from './utils/SiweUtils';
3132
import {storage} from './utils/StorageUtil';
3233
import {ActionsView} from './views/ActionsView';
34+
import {WalletInfoView} from './views/WalletInfoView';
3335

34-
// 1. Get projectId at https://cloud.reown.com
36+
// 1. Get projectId at https://dashboard.reown.com
3537
const projectId = ENV_PROJECT_ID;
3638

3739
// 2. Define your chains
@@ -54,19 +56,11 @@ const clipboardClient = {
5456
},
5557
};
5658

57-
const ethersAdapter = new EthersAdapter({
58-
projectId,
59-
});
60-
61-
const solanaAdapter = new SolanaAdapter({
62-
projectId,
63-
});
64-
65-
const bitcoinAdapter = new BitcoinAdapter({
66-
projectId,
67-
});
68-
69-
const adapters = [ethersAdapter, solanaAdapter, bitcoinAdapter];
59+
const adapters = [
60+
new EthersAdapter(),
61+
new SolanaAdapter(),
62+
new BitcoinAdapter(),
63+
];
7064

7165
// 3. Create modal
7266
const appKit = createAppKit({
@@ -79,7 +73,7 @@ const appKit = createAppKit({
7973
clipboardClient,
8074
enableAnalytics: true,
8175
extraConnectors: [
82-
new PhantomConnector({cluster: 'mainnet-beta'}),
76+
new PhantomConnector(),
8377
new CoinbaseConnector({storage: new MMKV()}),
8478
],
8579
features: {
@@ -108,10 +102,12 @@ function App(): React.JSX.Element {
108102
AppKit + ethers
109103
</Text>
110104
<FlexView style={styles.buttonContainer}>
105+
<WalletInfoView />
111106
<AppKitButton balance="show" />
112107
<NetworkButton />
113108
<ActionsView />
114109
</FlexView>
110+
<Toast />
115111
<AppKit />
116112
</AppKitProvider>
117113
</SafeAreaView>

dapps/W3MEthers/src/components/RequestModal.tsx

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)