Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
[mobile] Replace hardcoded provider url with env var (#4476)
Browse files Browse the repository at this point in the history
* Replace hardcoded provider url with env var

* Update doc
  • Loading branch information
Franck authored May 29, 2020
1 parent e916fa3 commit c661493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ To run the mobile app on your phone, you need to both start the Metro builder se

If you want to use a physical device in combination with the marketplace DApp running on your local machine (i.e. `Localhost` setting in network selection) make sure you set the `HOST` environment variable to your internal network IP address (e.g. 10.10.10.1).

### Build
Make sure to set the env var MAINNET_PROVIDER_URL and RINKEBY_PROVIDER_URL. They are used [here](./src/constant.js)

### Tips

> Is there a way to remotely debug the app?
Expand Down
6 changes: 2 additions & 4 deletions mobile/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ export const NETWORKS = [
id: 1,
name: 'Mainnet',
dappUrl: 'https://shoporigin.com/#/',
provider:
'https://eth-mainnet.alchemyapi.io/v2/snPxmbyVLjq1Sq32Z4pAal7FXwe941uf'
provider: process.env.MAINNET_PROVIDER_URL
},
{
id: 4,
name: 'Rinkeby',
dappUrl: 'https://dapp.staging.originprotocol.com/#/',
provider:
'https://eth-rinkeby.alchemyapi.io/v2/D0SsolVDcXCw6K6j2LWqcpW49QIukUkI'
provider: process.env.RINKEBY_PROVIDER_URL
},
{
id: 2222,
Expand Down

0 comments on commit c661493

Please sign in to comment.