Skip to content

Commit 48e40b3

Browse files
chore: improvements (#183)
1 parent ed21391 commit 48e40b3

File tree

36 files changed

+859
-161
lines changed

36 files changed

+859
-161
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ source "https://rubygems.org"
22

33
gem "fastlane"
44
gem "cocoapods", '1.15.2'
5+

Gemfile.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ GEM
2323
artifactory (3.0.17)
2424
atomos (0.1.3)
2525
aws-eventstream (1.3.0)
26-
aws-partitions (1.913.0)
27-
aws-sdk-core (3.191.6)
26+
aws-partitions (1.991.0)
27+
aws-sdk-core (3.209.1)
2828
aws-eventstream (~> 1, >= 1.3.0)
2929
aws-partitions (~> 1, >= 1.651.0)
30-
aws-sigv4 (~> 1.8)
30+
aws-sigv4 (~> 1.9)
3131
jmespath (~> 1, >= 1.6.1)
32-
aws-sdk-kms (1.78.0)
33-
aws-sdk-core (~> 3, >= 3.191.0)
34-
aws-sigv4 (~> 1.1)
35-
aws-sdk-s3 (1.146.1)
36-
aws-sdk-core (~> 3, >= 3.191.0)
32+
aws-sdk-kms (1.94.0)
33+
aws-sdk-core (~> 3, >= 3.207.0)
34+
aws-sigv4 (~> 1.5)
35+
aws-sdk-s3 (1.167.0)
36+
aws-sdk-core (~> 3, >= 3.207.0)
3737
aws-sdk-kms (~> 1)
38-
aws-sigv4 (~> 1.8)
39-
aws-sigv4 (1.8.0)
38+
aws-sigv4 (~> 1.5)
39+
aws-sigv4 (1.10.0)
4040
aws-eventstream (~> 1, >= 1.0.2)
4141
babosa (1.0.4)
4242
base64 (0.2.0)
@@ -95,8 +95,8 @@ GEM
9595
escape (0.0.4)
9696
ethon (0.16.0)
9797
ffi (>= 1.15.0)
98-
excon (0.110.0)
99-
faraday (1.10.3)
98+
excon (0.112.0)
99+
faraday (1.10.4)
100100
faraday-em_http (~> 1.0)
101101
faraday-em_synchrony (~> 1.0)
102102
faraday-excon (~> 1.1)
@@ -117,15 +117,15 @@ GEM
117117
faraday-httpclient (1.0.1)
118118
faraday-multipart (1.0.4)
119119
multipart-post (~> 2)
120-
faraday-net_http (1.0.1)
120+
faraday-net_http (1.0.2)
121121
faraday-net_http_persistent (1.2.0)
122122
faraday-patron (1.0.0)
123123
faraday-rack (1.0.0)
124124
faraday-retry (1.0.3)
125-
faraday_middleware (1.2.0)
125+
faraday_middleware (1.2.1)
126126
faraday (~> 1.0)
127127
fastimage (2.3.1)
128-
fastlane (2.220.0)
128+
fastlane (2.224.0)
129129
CFPropertyList (>= 2.3, < 4.0.0)
130130
addressable (>= 2.8, < 3.0.0)
131131
artifactory (~> 3.0)
@@ -186,7 +186,7 @@ GEM
186186
google-apis-core (>= 0.11.0, < 2.a)
187187
google-apis-storage_v1 (0.31.0)
188188
google-apis-core (>= 0.11.0, < 2.a)
189-
google-cloud-core (1.7.0)
189+
google-cloud-core (1.7.1)
190190
google-cloud-env (>= 1.0, < 3.a)
191191
google-cloud-errors (~> 1.0)
192192
google-cloud-env (1.6.0)
@@ -207,28 +207,28 @@ GEM
207207
os (>= 0.9, < 2.0)
208208
signet (>= 0.16, < 2.a)
209209
highline (2.0.3)
210-
http-cookie (1.0.5)
210+
http-cookie (1.0.7)
211211
domain_name (~> 0.5)
212212
httpclient (2.8.3)
213213
i18n (1.14.4)
214214
concurrent-ruby (~> 1.0)
215215
jmespath (1.6.2)
216216
json (2.7.2)
217-
jwt (2.8.1)
217+
jwt (2.9.3)
218218
base64
219-
mini_magick (4.12.0)
219+
mini_magick (4.13.2)
220220
mini_mime (1.1.5)
221221
minitest (5.22.3)
222222
molinillo (0.8.0)
223223
multi_json (1.15.0)
224-
multipart-post (2.4.0)
224+
multipart-post (2.4.1)
225225
mutex_m (0.2.0)
226226
nanaimo (0.3.0)
227227
nap (1.1.0)
228228
naturally (2.2.1)
229229
netrc (0.11.0)
230230
nkf (0.2.0)
231-
optparse (0.4.0)
231+
optparse (0.5.0)
232232
os (1.1.4)
233233
plist (3.7.1)
234234
public_suffix (4.0.7)
@@ -265,7 +265,7 @@ GEM
265265
tzinfo (2.0.6)
266266
concurrent-ruby (~> 1.0)
267267
uber (0.1.0)
268-
unicode-display_width (2.5.0)
268+
unicode-display_width (2.6.0)
269269
word_wrap (1.0.0)
270270
xcodeproj (1.24.0)
271271
CFPropertyList (>= 2.3.3, < 4.0)
@@ -288,4 +288,4 @@ DEPENDENCIES
288288
fastlane
289289

290290
BUNDLED WITH
291-
2.4.10
291+
2.4.10

dapps/ModalEthers/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function App(): JSX.Element {
8585

8686
const amount = sanitizeHex(numberToHex(0.0001));
8787
const transaction = {
88-
to: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', // vitalik.eth
88+
to: '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689', // test address
8989
value: amount,
9090
chainId,
9191
data: '0x',

dapps/ModalUProvider/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function App(): JSX.Element {
8282

8383
const transaction = {
8484
from: address,
85-
to: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', // vitalik.eth
85+
to: '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689', // test address
8686
value: amount,
8787
chainId,
8888
data: '0x',

dapps/ModalViem/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function App(): JSX.Element {
112112
const hash = await walletClient.sendTransaction({
113113
chain: mainnet,
114114
account: address,
115-
to: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', // vitalik.eth
115+
to: '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689', // test address
116116
value: parseEther('0.001'),
117117
data: '0x',
118118
});

dapps/W3MEthers/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ PODS:
970970
- React-Mapbuffer (0.73.4):
971971
- glog
972972
- React-debug
973-
- react-native-compat (2.16.1):
973+
- react-native-compat (2.17.2):
974974
- glog
975975
- RCT-Folly (= 2022.05.16.00)
976976
- React-Core
@@ -1449,7 +1449,7 @@ SPEC CHECKSUMS:
14491449
React-jsinspector: 9ac353eccf6ab54d1e0a33862ba91221d1e88460
14501450
React-logger: 0a57b68dd2aec7ff738195f081f0520724b35dab
14511451
React-Mapbuffer: 63913773ed7f96b814a2521e13e6d010282096ad
1452-
react-native-compat: 18a0603ec7be84855f7a908329ea877069d47570
1452+
react-native-compat: 2861835380e647c6742d54af0414e54d7e24dfbf
14531453
react-native-get-random-values: 384787fd76976f5aec9465aff6fa9e9129af1e74
14541454
react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43
14551455
react-native-netinfo: 8a7fd3f7130ef4ad2fb4276d5c9f8d3f28d2df3d

dapps/W3MEthers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@react-native-async-storage/async-storage": "1.21.0",
1616
"@react-native-clipboard/clipboard": "1.13.2",
1717
"@react-native-community/netinfo": "11.2.1",
18-
"@walletconnect/react-native-compat": "2.16.1",
18+
"@walletconnect/react-native-compat": "2.17.2",
1919
"@reown/appkit-coinbase-ethers-react-native": "1.0.2",
2020
"@reown/appkit-auth-ethers-react-native": "1.0.2",
2121
"@reown/appkit-ethers-react-native": "1.0.2",

dapps/W3MEthers/src/components/RequestModal.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function RequestModal({
2626
return (
2727
<Modal isVisible={isVisible} onBackdropPress={onClose}>
2828
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
29-
<Text>X</Text>
29+
<Text style={styles.close}>X</Text>
3030
</TouchableOpacity>
3131
<View style={styles.innerContainer}>
3232
{isLoading && (
@@ -43,7 +43,9 @@ export function RequestModal({
4343
<Text style={[styles.title, styles.successText]}>
4444
Request Response
4545
</Text>
46-
<Text style={styles.responseText}>{rpcResponse}</Text>
46+
<Text style={styles.responseText} numberOfLines={5}>
47+
{rpcResponse}
48+
</Text>
4749
</>
4850
)}
4951
{rpcError && (
@@ -52,7 +54,10 @@ export function RequestModal({
5254
Request Failure
5355
</Text>
5456
<Text style={styles.subtitle}>
55-
Error: <Text style={styles.responseText}>{rpcError}</Text>
57+
Error:{' '}
58+
<Text style={styles.responseText} numberOfLines={5}>
59+
{rpcError}
60+
</Text>
5661
</Text>
5762
</>
5863
)}
@@ -72,6 +77,9 @@ const styles = StyleSheet.create({
7277
borderRadius: 100,
7378
margin: 8,
7479
},
80+
close: {
81+
color: 'black',
82+
},
7583
innerContainer: {
7684
padding: 16,
7785
backgroundColor: 'white',
@@ -105,5 +113,6 @@ const styles = StyleSheet.create({
105113
},
106114
responseText: {
107115
fontWeight: '300',
116+
color: 'black',
108117
},
109118
});

dapps/W3MEthers/src/utils/misc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const testAddress = '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689';

dapps/W3MEthers/src/views/ReadContract.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
useAppKitAccount,
88
useAppKitProvider,
99
} from '@reown/appkit-ethers-react-native';
10-
import {BrowserProvider, Contract} from 'ethers';
10+
import {BrowserProvider, Contract, JsonRpcSigner} from 'ethers';
1111
import wagmigotchiABI from '../utils/wagmigotchiABI';
1212

1313
export function ReadContract() {
@@ -16,7 +16,7 @@ export function ReadContract() {
1616
const [data, setData] = useState<string | undefined>();
1717
const [error, setError] = useState(false);
1818
const {walletProvider} = useAppKitProvider();
19-
const {isConnected} = useAppKitAccount();
19+
const {isConnected, address} = useAppKitAccount();
2020

2121
const onPress = async () => {
2222
if (!isConnected || !walletProvider) {
@@ -30,13 +30,14 @@ export function ReadContract() {
3030

3131
try {
3232
const ethersProvider = new BrowserProvider(walletProvider);
33-
const signer = await ethersProvider.getSigner();
33+
const signer = new JsonRpcSigner(ethersProvider, address!);
3434
const contractAddress = '0xecb504d39723b0be0e3a9aa33d646642d1051ee1';
3535
const contractABI = wagmigotchiABI;
3636
const contract = new Contract(contractAddress, contractABI, signer);
3737
const balance = await contract.getHunger();
3838
setData(balance.toString());
39-
} catch {
39+
} catch (e) {
40+
console.log(e);
4041
setError(true);
4142
}
4243
setIsLoading(false);

0 commit comments

Comments
 (0)