diff options
author | F. Eugene Aumson <gene@aumson.org> | 2018-08-30 19:31:04 +0800 |
---|---|---|
committer | F. Eugene Aumson <gene@aumson.org> | 2018-08-30 22:08:35 +0800 |
commit | 5088b7f23c087366559259c832b7a390b892e2e5 (patch) | |
tree | 3f9185d2f07d22dcb8ec4cf34b052f5e9bd7d38a | |
parent | 28246abec3b974ae0a4fb2e9bdd0b8f337e829ce (diff) | |
download | dexon-sol-tools-5088b7f23c087366559259c832b7a390b892e2e5.tar.gz dexon-sol-tools-5088b7f23c087366559259c832b7a390b892e2e5.tar.zst dexon-sol-tools-5088b7f23c087366559259c832b7a390b892e2e5.zip |
hack postinstall to correct types package symlink
yarn is not doing this properly :( even on v1.9.4.
confirmed with @albrow .
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/handler.ts | 23 |
2 files changed, 14 insertions, 12 deletions
diff --git a/package.json b/package.json index 8d4aff4ca..871a9f718 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js", "test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break -1; done;", "lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing", - "comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete." + "comment:postinstall": "HACK: For some reason `yarn` is not setting up symlink properly for types. We temporarily make it manually. Remove this ASAP!", + "postinstall": "mv node_modules/@0xproject/types node_modules/@0xproject/types-0.8.1; for i in website sra-report; do cp -R node_modules/@0xproject/types-0.8.1 packages/$i/node_modules/@0xproject/types; done; ln -s ../../packages/types node_modules/@0xproject/types" }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic", diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts index 3749bc70b..9abfcc4f0 100644 --- a/packages/testnet-faucets/src/ts/handler.ts +++ b/packages/testnet-faucets/src/ts/handler.ts @@ -143,21 +143,22 @@ export class Handler { if (_.isUndefined(takerToken)) { throw new Error(`Unsupported asset type: ${requestedAssetType}`); } - const makerTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), makerToken.decimals); - const takerTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), takerToken.decimals); + const makerAssetAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), makerToken.decimals); + const takerAssetAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), takerToken.decimals); const order: Order = { - maker: configs.DISPENSER_ADDRESS, - taker: req.params.recipient, + senderAddress: configs.DISPENSER_ADDRESS, + makerAddress: configs.DISPENSER_ADDRESS, + takerAddress: req.params.recipient, makerFee: new BigNumber(0), takerFee: new BigNumber(0), - makerTokenAmount, - takerTokenAmount, - makerTokenAddress: makerToken.address, - takerTokenAddress: takerToken.address, + makerAssetAmount, + takerAssetAmount, + makerAssetData: makerToken.address, + takerAssetData: takerToken.address, salt: ZeroEx.generatePseudoRandomSalt(), - exchangeContractAddress: zeroEx.exchange.getContractAddress(), - feeRecipient: ZeroEx.NULL_ADDRESS, - expirationUnixTimestampSec: new BigNumber(Date.now() + FIVE_DAYS_IN_MS), + exchangeAddress: zeroEx.exchange.getContractAddress(), + feeRecipientAddress: ZeroEx.NULL_ADDRESS, + expirationTimeSeconds: new BigNumber(Date.now() + FIVE_DAYS_IN_MS), }; const orderHash = ZeroEx.getOrderHashHex(order); const signature = await zeroEx.signOrderHashAsync(orderHash, configs.DISPENSER_ADDRESS, false); |