diff options
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/web3-wrapper/CHANGELOG.md | 4 | ||||
-rw-r--r-- | packages/web3-wrapper/package.json | 8 | ||||
-rw-r--r-- | packages/web3-wrapper/src/marshaller.ts | 12 | ||||
-rw-r--r-- | packages/web3-wrapper/src/utils.ts | 4 | ||||
-rw-r--r-- | packages/web3-wrapper/src/web3_wrapper.ts | 2 |
6 files changed, 26 insertions, 13 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 0b83ad13d..846e8320e 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -13,6 +13,15 @@ ] }, { + "timestamp": 1531919263, + "version": "0.7.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1531149657, "version": "0.7.2", "changes": [ diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index f6795100e..324e60643 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v0.7.3 - _July 18, 2018_ + + * Dependencies updated + ## v0.7.2 - _July 9, 2018_ * Dependencies updated diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 9716be5bf..13e5d2bcd 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/web3-wrapper", - "version": "0.7.2", + "version": "0.7.3", "engines": { "node": ">=6.12" }, @@ -59,15 +59,15 @@ "npm-run-all": "^4.1.2", "nyc": "^11.0.1", "shx": "^0.2.2", - "tslint": "5.8.0", + "tslint": "5.11.0", "typedoc": "0xProject/typedoc", "typescript": "2.7.1" }, "dependencies": { "@0xproject/assert": "0.3.0", "@0xproject/json-schemas": "^1.0.0", - "@0xproject/typescript-typings": "^0.4.2", - "@0xproject/utils": "^0.7.2", + "@0xproject/typescript-typings": "^0.4.3", + "@0xproject/utils": "^0.7.3", "ethereum-types": "^0.0.2", "ethereumjs-util": "^5.1.1", "ethers": "3.0.22", diff --git a/packages/web3-wrapper/src/marshaller.ts b/packages/web3-wrapper/src/marshaller.ts index 15384417e..fed197822 100644 --- a/packages/web3-wrapper/src/marshaller.ts +++ b/packages/web3-wrapper/src/marshaller.ts @@ -54,7 +54,7 @@ export const marshaller = { transactions: [] as Transaction[], }; block.transactions = _.map(blockWithHexValues.transactions, (tx: TransactionRPC) => { - const transaction = this.unmarshalTransaction(tx); + const transaction = marshaller.unmarshalTransaction(tx); return transaction; }); return block; @@ -94,10 +94,10 @@ export const marshaller = { ...txData, }; delete callTxDataBase.from; - const callTxDataBaseRPC = this._marshalCallTxDataBase(callTxDataBase); + const callTxDataBaseRPC = marshaller._marshalCallTxDataBase(callTxDataBase); const txDataRPC = { ...callTxDataBaseRPC, - from: this.marshalAddress(txData.from), + from: marshaller.marshalAddress(txData.from), }; const prunableIfUndefined = ['gasPrice', 'gas', 'value', 'nonce']; _.each(txDataRPC, (value: any, key: string) => { @@ -112,10 +112,10 @@ export const marshaller = { ...callData, }; delete callTxDataBase.from; - const callTxDataBaseRPC = this._marshalCallTxDataBase(callTxDataBase); + const callTxDataBaseRPC = marshaller._marshalCallTxDataBase(callTxDataBase); const callDataRPC = { ...callTxDataBaseRPC, - from: _.isUndefined(callData.from) ? undefined : this.marshalAddress(callData.from), + from: _.isUndefined(callData.from) ? undefined : marshaller.marshalAddress(callData.from), }; return callDataRPC; }, @@ -144,7 +144,7 @@ export const marshaller = { _marshalCallTxDataBase(callTxDataBase: Partial<CallTxDataBase>): Partial<CallTxDataBaseRPC> { const callTxDataBaseRPC = { ...callTxDataBase, - to: _.isUndefined(callTxDataBase.to) ? undefined : this.marshalAddress(callTxDataBase.to), + to: _.isUndefined(callTxDataBase.to) ? undefined : marshaller.marshalAddress(callTxDataBase.to), gasPrice: _.isUndefined(callTxDataBase.gasPrice) ? undefined : utils.encodeAmountAsHexString(callTxDataBase.gasPrice), diff --git a/packages/web3-wrapper/src/utils.ts b/packages/web3-wrapper/src/utils.ts index d13eb9404..01605dc9a 100644 --- a/packages/web3-wrapper/src/utils.ts +++ b/packages/web3-wrapper/src/utils.ts @@ -15,7 +15,7 @@ export const utils = { if (_.isNull(hex)) { return null; } - const decimal = this.convertHexToNumber(hex); + const decimal = utils.convertHexToNumber(hex); return decimal; }, convertAmountToBigNumber(value: string | number | BigNumber): BigNumber { @@ -40,7 +40,7 @@ export const utils = { return valueBigNumber.lessThan(0) ? '-0x' + valueHex.substr(1) : '0x' + valueHex; }, numberToHex(value: number): string { - if (!isFinite(value) && !this.isHexStrict(value)) { + if (!isFinite(value) && !utils.isHexStrict(value)) { throw new Error(`Given input ${value} is not a number.`); } diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index 495523e44..e828708f0 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -50,7 +50,7 @@ export class Web3Wrapper { public isZeroExWeb3Wrapper = true; public abiDecoder: AbiDecoder; private _provider: Provider; - private _txDefaults: Partial<TxData>; + private readonly _txDefaults: Partial<TxData>; private _jsonRpcRequestId: number; /** * Check if an address is a valid Ethereum address |