aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-02-10 04:27:28 +0800
committerJacob Evans <jacob@dekz.net>2018-02-10 04:27:28 +0800
commit0a2947b86039030707d0d1bf20c27857bffad2aa (patch)
treeb91ff5cc4db5ff2cc348dffe99489cbbfbd4a5a3 /packages/testnet-faucets
parente68b9c7e81dd89867fadef3d1d87a988f968f450 (diff)
downloaddexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.tar
dexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.tar.gz
dexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.tar.bz2
dexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.tar.lz
dexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.tar.xz
dexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.tar.zst
dexon-sol-tools-0a2947b86039030707d0d1bf20c27857bffad2aa.zip
address is not optional in this context
Diffstat (limited to 'packages/testnet-faucets')
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts
index bf713d709..5f6ada186 100644
--- a/packages/testnet-faucets/src/ts/handler.ts
+++ b/packages/testnet-faucets/src/ts/handler.ts
@@ -130,13 +130,13 @@ export class Handler {
const zeroEx = networkConfig.zeroEx;
res.setHeader('Content-Type', 'application/json');
const makerToken = await zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync(requestedAssetType);
- if (_.isUndefined(makerToken) || _.isUndefined(makerToken.address)) {
+ if (_.isUndefined(makerToken)) {
throw new Error(`Unsupported asset type: ${requestedAssetType}`);
}
const takerTokenSymbol =
requestedAssetType === RequestedAssetType.WETH ? RequestedAssetType.ZRX : RequestedAssetType.WETH;
const takerToken = await zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync(takerTokenSymbol);
- if (_.isUndefined(takerToken) || _.isUndefined(takerToken.address)) {
+ if (_.isUndefined(takerToken)) {
throw new Error(`Unsupported asset type: ${requestedAssetType}`);
}
const makerTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), makerToken.decimals);