Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/dapps/W3MEthers/serv…
Browse files Browse the repository at this point in the history
…e-static-1.16.2
  • Loading branch information
ignaciosantise authored Jan 20, 2025
2 parents c771835 + 6a6c148 commit 3b29581
Show file tree
Hide file tree
Showing 53 changed files with 1,804 additions and 938 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/cli-dapp.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/cli-wallet.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release-ios-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ jobs:
APPLE_KEY_ID: ${{ secrets.apple-key-id }}
APPLE_KEY_CONTENT: ${{ secrets.apple-key-content }}
APPLE_ISSUER_ID: ${{ secrets.apple-issuer-id }}
BUNDLE_ID: ${{ inputs.bundle-id }}
MATCH_USERNAME: ${{ secrets.match-username }}
MATCH_PASSWORD: ${{ secrets.match-keychain-password }}
MATCH_GIT_URL: ${{ secrets.match-git-url }}
BUNDLE_ID: ${{ inputs.bundle-id }}
SCHEME: ${{ inputs.scheme-name }}
PODFILE_PATH: ${{ inputs.root-path }}/ios/Podfile
SCHEME: ${{ inputs.scheme-name }}
XCODE_PROJECT_PATH: ${{ inputs.xcode-project-path }}
XCWORKSPACE_PATH: ${{ inputs.xcode-workspace-path }}
46 changes: 23 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.913.0)
aws-sdk-core (3.191.6)
aws-partitions (1.991.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.78.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.146.1)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down Expand Up @@ -95,8 +95,8 @@ GEM
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.110.0)
faraday (1.10.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -117,15 +117,15 @@ GEM
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.220.0)
fastlane (2.224.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -186,7 +186,7 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
Expand All @@ -207,28 +207,28 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.1)
jwt (2.9.3)
base64
mini_magick (4.12.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.22.3)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.4.0)
multipart-post (2.4.1)
mutex_m (0.2.0)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
nkf (0.2.0)
optparse (0.4.0)
optparse (0.5.0)
os (1.1.4)
plist (3.7.1)
public_suffix (4.0.7)
Expand Down Expand Up @@ -265,7 +265,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
Expand All @@ -288,4 +288,4 @@ DEPENDENCIES
fastlane

BUNDLED WITH
2.4.10
2.4.10
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ React Native examples implementing Reown AppKit and WalletKit
- WalletConnect Modal + Ethers v5: `dapps/ModalEthers`
- WalletConnect Modal + Universal Provider: `dapps/ModalUProvider`

- AppKit + Wagmi v1: `dapps/W3MWagmi`
- AppKit + Wagmi: `dapps/W3MWagmi`
- AppKit + Ethers: `dapps/W3MEthers`
- AppKit + Ethers v5: `dapps/W3MEthers5`

Expand Down
2 changes: 1 addition & 1 deletion dapps/ModalEthers/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function App(): JSX.Element {

const amount = sanitizeHex(numberToHex(0.0001));
const transaction = {
to: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', // vitalik.eth
to: '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689', // test address
value: amount,
chainId,
data: '0x',
Expand Down
2 changes: 1 addition & 1 deletion dapps/ModalUProvider/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function App(): JSX.Element {

const transaction = {
from: address,
to: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', // vitalik.eth
to: '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689', // test address
value: amount,
chainId,
data: '0x',
Expand Down
2 changes: 1 addition & 1 deletion dapps/ModalViem/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function App(): JSX.Element {
const hash = await walletClient.sendTransaction({
chain: mainnet,
account: address,
to: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', // vitalik.eth
to: '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689', // test address
value: parseEther('0.001'),
data: '0x',
});
Expand Down
4 changes: 2 additions & 2 deletions dapps/W3MEthers/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ PODS:
- React-Mapbuffer (0.73.4):
- glog
- React-debug
- react-native-compat (2.16.1):
- react-native-compat (2.17.2):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1449,7 +1449,7 @@ SPEC CHECKSUMS:
React-jsinspector: 9ac353eccf6ab54d1e0a33862ba91221d1e88460
React-logger: 0a57b68dd2aec7ff738195f081f0520724b35dab
React-Mapbuffer: 63913773ed7f96b814a2521e13e6d010282096ad
react-native-compat: 18a0603ec7be84855f7a908329ea877069d47570
react-native-compat: 2861835380e647c6742d54af0414e54d7e24dfbf
react-native-get-random-values: 384787fd76976f5aec9465aff6fa9e9129af1e74
react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43
react-native-netinfo: 8a7fd3f7130ef4ad2fb4276d5c9f8d3f28d2df3d
Expand Down
8 changes: 4 additions & 4 deletions dapps/W3MEthers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-clipboard/clipboard": "1.13.2",
"@react-native-community/netinfo": "11.2.1",
"@walletconnect/react-native-compat": "2.16.1",
"@reown/appkit-coinbase-ethers-react-native": "1.0.2",
"@reown/appkit-auth-ethers-react-native": "1.0.2",
"@reown/appkit-ethers-react-native": "1.0.2",
"@walletconnect/react-native-compat": "2.17.2",
"@reown/appkit-coinbase-ethers-react-native": "1.2.0",
"@reown/appkit-auth-ethers-react-native": "1.2.0",
"@reown/appkit-ethers-react-native": "1.2.0",
"ethers": "6.10.0",
"expo": "^50.0.0",
"react": "18.2.0",
Expand Down
3 changes: 3 additions & 0 deletions dapps/W3MEthers/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ createAppKit({
customWallets,
clipboardClient,
enableAnalytics: true,
features: {
swaps: true,
},
});

function App(): React.JSX.Element {
Expand Down
15 changes: 12 additions & 3 deletions dapps/W3MEthers/src/components/RequestModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function RequestModal({
return (
<Modal isVisible={isVisible} onBackdropPress={onClose}>
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
<Text>X</Text>
<Text style={styles.close}>X</Text>
</TouchableOpacity>
<View style={styles.innerContainer}>
{isLoading && (
Expand All @@ -43,7 +43,9 @@ export function RequestModal({
<Text style={[styles.title, styles.successText]}>
Request Response
</Text>
<Text style={styles.responseText}>{rpcResponse}</Text>
<Text style={styles.responseText} numberOfLines={5}>
{rpcResponse}
</Text>
</>
)}
{rpcError && (
Expand All @@ -52,7 +54,10 @@ export function RequestModal({
Request Failure
</Text>
<Text style={styles.subtitle}>
Error: <Text style={styles.responseText}>{rpcError}</Text>
Error:{' '}
<Text style={styles.responseText} numberOfLines={5}>
{rpcError}
</Text>
</Text>
</>
)}
Expand All @@ -72,6 +77,9 @@ const styles = StyleSheet.create({
borderRadius: 100,
margin: 8,
},
close: {
color: 'black',
},
innerContainer: {
padding: 16,
backgroundColor: 'white',
Expand Down Expand Up @@ -105,5 +113,6 @@ const styles = StyleSheet.create({
},
responseText: {
fontWeight: '300',
color: 'black',
},
});
1 change: 1 addition & 0 deletions dapps/W3MEthers/src/utils/misc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const testAddress = '0x704457b418E9Fb723e1Bc0cB98106a6B8Cf87689';
9 changes: 5 additions & 4 deletions dapps/W3MEthers/src/views/ReadContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useAppKitAccount,
useAppKitProvider,
} from '@reown/appkit-ethers-react-native';
import {BrowserProvider, Contract} from 'ethers';
import {BrowserProvider, Contract, JsonRpcSigner} from 'ethers';
import wagmigotchiABI from '../utils/wagmigotchiABI';

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

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

try {
const ethersProvider = new BrowserProvider(walletProvider);
const signer = await ethersProvider.getSigner();
const signer = new JsonRpcSigner(ethersProvider, address!);
const contractAddress = '0xecb504d39723b0be0e3a9aa33d646642d1051ee1';
const contractABI = wagmigotchiABI;
const contract = new Contract(contractAddress, contractABI, signer);
const balance = await contract.getHunger();
setData(balance.toString());
} catch {
} catch (e) {
console.log(e);
setError(true);
}
setIsLoading(false);
Expand Down
Loading

0 comments on commit 3b29581

Please sign in to comment.