Add networkId to faucet requests so that we can request tokens on Kovan, Rinkeby and Ropsten

This commit is contained in:
Fabio Berger
2018-02-06 17:22:20 -08:00
parent 4c9c4c487a
commit 03f5c9b950
2 changed files with 4 additions and 2 deletions

View File

@@ -599,7 +599,9 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
await utils.sleepAsync(ARTIFICIAL_FAUCET_REQUEST_DELAY);
const segment = isEtherRequest ? 'ether' : 'zrx';
const response = await fetch(`${constants.URL_ETHER_FAUCET}/${segment}/${this.props.userAddress}`);
const response = await fetch(
`${constants.URL_TESTNET_FAUCET}/${segment}/${this.props.userAddress}?networkId=${this.props.networkId}`,
);
const responseBody = await response.text();
if (response.status !== constants.SUCCESS_STATUS) {
utils.consoleLog(`Unexpected status code: ${response.status} -> ${responseBody}`);