Metronome Mobile Wallet
This is a Metronome-specific mobile wallet build on React Native.
After cloning the project, run
The following tools are required
- Node v12 at minimum (v14 is recommended)
- Android studio v4.2.1
- xCode v12.5
- cocoapods 1.10.0
# Bundle the application npm run ios:bundle # Start metro in terminal 1 npm run start # run the emulator in terminal 2 npm run ios
emulator -list-avds # If you get "emulator command not found" error, please see troubleshooting section below # pick a device from that list and then run the following in terminal 1 emulator @<device-name> # Start metro in terminal 2 npm start # run the emulator in terminal 3 npm run android
And the run the commands mentioned above
To customize the build, create a
.env. The following variables are supported:
ENABLED_CHAINS: A comma separated string of configuration filenames. See
MORDOR_NODE_URL: Mordor testnet URLs.
ROPSTEN_NODE_URL: Ropsten testnet URLs.
cp sentry.properties.example ios/sentry.properties cp sentry.properties.example android/sentry.properties
Then add your keys into both files.
- If you're using
nvmand you get the error
Command PhaseScriptExecution failed with a nonzero exit code
Make sure you've run the commands for Sentry setup above
sentry.properties with a real sentry config.
If the issue persist, check this issue facebook/react-native#31181 - you might need to set an alias for
# replace "lts/erbium" with the appropiate lts version listed in nvm list nvm alias "default" "lts/fermium"
If you get the error
env: node: No such file or directory
You might need to link your nvm with your
sudo ln -s "$(which node)" /usr/local/bin/node
As stated in this answer
- If you get the error
error: SDK "iphoneos" cannot be locatedwhen running
npm ci, run the following commmand:
sudo xcode-select --switch /Applications/Xcode.app
npm ci again
- If you don't have an emulator installed, after installing Android Studio, set the following env variables:
# Android emulator path export ANDROID_SDK=$HOME/Library/Android/sdk export PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$PATH export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH:$ANDROID_HOME/platform-tools # jdk path - update accordingly with your jdk path export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
You will have to download the Jdk version (1.8 at minimum) - and set the JAVA_HOME.
You can follow the documentation to add a new device.