diff --git a/dapps/W3MWagmi/package.json b/dapps/W3MWagmi/package.json index e00fd89c..8c0c59af 100644 --- a/dapps/W3MWagmi/package.json +++ b/dapps/W3MWagmi/package.json @@ -3,14 +3,17 @@ "version": "0.0.1", "private": true, "scripts": { - "android": "./scripts/copy-variant-files.sh 'debug' && react-native run-android --appId com.walletconnect.web3modal.rnsample.debug", - "android:build": "cd android && ./gradlew clean && ./gradlew assembleRelease", - "android:build:internal": "./scripts/copy-variant-files.sh 'internal' && cd android && ./gradlew clean && ./gradlew assembleInternal", + "android": "yarn run copy:debug && react-native run-android --appId com.walletconnect.web3modal.rnsample.debug", + "android:build": "yarn run copy:production && cd android && ./gradlew clean && ./gradlew assembleRelease", + "android:build:internal": "yarn run copy:internal && cd android && ./gradlew clean && ./gradlew assembleInternal", "ios": "react-native run-ios", "ios:internal": "react-native run-ios --scheme 'W3MWagmi Internal' ", "lint": "eslint .", "start": "react-native start", - "test": "jest" + "test": "jest", + "copy:debug": "./scripts/copy-variant-files.sh 'debug'", + "copy:internal": "./scripts/copy-variant-files.sh 'internal'", + "copy:production": "./scripts/copy-variant-files.sh 'production'" }, "dependencies": { "@coinbase/wallet-mobile-sdk": "1.0.13", diff --git a/dapps/W3MWagmi/scripts/copy-variant-files.sh b/dapps/W3MWagmi/scripts/copy-variant-files.sh index 246af7a8..19ed19ee 100755 --- a/dapps/W3MWagmi/scripts/copy-variant-files.sh +++ b/dapps/W3MWagmi/scripts/copy-variant-files.sh @@ -1,9 +1,13 @@ #!/bin/bash +if [ "$1" == "debug" ]; then + cp scripts/misc_debug.ts src/utils/misc.ts +fi + if [ "$1" == "internal" ]; then cp scripts/misc_internal.ts src/utils/misc.ts fi -if [ "$1" == "debug" ]; then - cp scripts/misc_debug.ts src/utils/misc.ts +if [ "$1" == "production" ]; then + cp scripts/misc_prod.ts src/utils/misc.ts fi \ No newline at end of file diff --git a/dapps/W3MWagmi/scripts/misc_debug.ts b/dapps/W3MWagmi/scripts/misc_debug.ts index f44266fd..203c07bb 100644 --- a/dapps/W3MWagmi/scripts/misc_debug.ts +++ b/dapps/W3MWagmi/scripts/misc_debug.ts @@ -1,11 +1,9 @@ -// If you are updating this file, please update src/utils/misc.ts as well - import {Platform} from 'react-native'; export const getMetadata = () => { return { - name: 'AppKit + wagmi', - description: 'AppKit + wagmi', + name: 'AppKit + wagmi (debug)', + description: 'AppKit + wagmi (debug)', url: 'https://walletconnect.com', icons: ['https://github.com/avatars/u/37784886'], redirect: { @@ -19,20 +17,20 @@ export const getMetadata = () => { export const getCustomWallets = () => { const wallets = [ { - id: 'rn-wallet', + id: 'rn-wallet-debug', name: 'Wallet (RN debug)', image_url: 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', mobile_link: 'rn-web3wallet-debug://', - link_mode: 'https://lab.web3modal.com/rn_walletkit_debug', + link_mode: 'https://dev.lab.web3modal.com/rn_walletkit_debug', }, { - id: 'rn-wallet', + id: 'rn-wallet-internal', name: 'Wallet (RN internal)', image_url: 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', mobile_link: 'rn-web3wallet-internal://', - link_mode: 'https://lab.web3modal.com/rn_walletkit_internal', + link_mode: 'https://dev.lab.web3modal.com/rn_walletkit_internal', }, { id: 'flutter-wallet-internal', diff --git a/dapps/W3MWagmi/scripts/misc_internal.ts b/dapps/W3MWagmi/scripts/misc_internal.ts index dccf0261..e9942a26 100644 --- a/dapps/W3MWagmi/scripts/misc_internal.ts +++ b/dapps/W3MWagmi/scripts/misc_internal.ts @@ -1,11 +1,9 @@ -// If you are updating this file, please update src/utils/misc.ts as well - import {Platform} from 'react-native'; export const getMetadata = () => { return { - name: 'AppKit + wagmi', - description: 'AppKit + wagmi', + name: 'AppKit + wagmi (internal)', + description: 'AppKit + wagmi (internal)', url: 'https://walletconnect.com', icons: ['https://github.com/avatars/u/37784886'], redirect: { @@ -19,7 +17,7 @@ export const getMetadata = () => { export const getCustomWallets = () => { const wallets = [ { - id: 'rn-wallet', + id: 'rn-wallet-internal', name: 'Wallet (RN internal)', image_url: 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', diff --git a/dapps/W3MWagmi/scripts/misc_prod.ts b/dapps/W3MWagmi/scripts/misc_prod.ts new file mode 100644 index 00000000..1538e454 --- /dev/null +++ b/dapps/W3MWagmi/scripts/misc_prod.ts @@ -0,0 +1,59 @@ +import {Platform} from 'react-native'; + +export const getMetadata = () => { + return { + name: 'AppKit + wagmi', + description: 'AppKit + wagmi', + url: 'https://walletconnect.com', + icons: ['https://github.com/avatars/u/37784886'], + redirect: { + native: 'w3mwagmisample://', + universal: 'https://lab.web3modal.com/rn_appkit', + linkMode: true, + }, + }; +}; + +export const getCustomWallets = () => { + const wallets = [ + { + id: 'rn-wallet', + name: 'Wallet(RN)', + image_url: + 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', + mobile_link: 'rn-web3wallet://', + link_mode: 'https://lab.web3modal.com/rn_walletkit', + }, + { + id: 'flutter-wallet', + name: 'Wallet(Flutter)', + image_url: + 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', + mobile_link: 'wcflutterwallet://', + link_mode: undefined, + }, + ]; + + if (Platform.OS === 'android') { + wallets.push({ + id: 'android-wallet', + name: 'Wallet(Android)', + image_url: + 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', + mobile_link: 'kotlin-web3wallet://', + link_mode: + 'https://web3modal-laboratory-git-chore-kotlin-assetlinks-walletconnect1.vercel.app/wallet', + }); + } else if (Platform.OS === 'ios') { + wallets.push({ + id: 'ios-wallet', + name: 'Wallet(iOS)', + image_url: + 'https://docs.walletconnect.com/assets/images/web3walletLogo-54d3b546146931ceaf47a3500868a73a.png', + mobile_link: 'walletapp://', + link_mode: 'https://lab.web3modal.com/wallet', + }); + } + + return wallets; +}; diff --git a/dapps/W3MWagmi/src/utils/misc.ts b/dapps/W3MWagmi/src/utils/misc.ts index 82955a77..1538e454 100644 --- a/dapps/W3MWagmi/src/utils/misc.ts +++ b/dapps/W3MWagmi/src/utils/misc.ts @@ -1,5 +1,3 @@ -// If you are updating this file, please update scripts/misc_internal.ts as well - import {Platform} from 'react-native'; export const getMetadata = () => { diff --git a/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet.xcscheme b/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet.xcscheme index aca7a2aa..1fd53f33 100644 --- a/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet.xcscheme +++ b/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet.xcscheme @@ -38,6 +38,22 @@ + + + + + + + + { + return { + name: 'React Native Wallet Example', + description: 'React Native Wallet for WalletConnect', + url: 'https://walletconnect.com/', + icons: ['https://github.com/avatars/u/37784886'], + redirect: { + native: 'rn-web3wallet://', + universal: 'https://dev.lab.web3modal.com/rn_walletkit', + linkMode: true, + }, + }; +};