aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders
diff options
context:
space:
mode:
Diffstat (limited to 'packages/subproviders')
-rw-r--r--packages/subproviders/CHANGELOG.json23
-rw-r--r--packages/subproviders/CHANGELOG.md29
-rw-r--r--packages/subproviders/package.json20
-rw-r--r--packages/subproviders/src/subproviders/base_wallet_subprovider.ts5
-rw-r--r--packages/subproviders/test/integration/ledger_subprovider_test.ts4
-rw-r--r--packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/utils/report_callback_errors.ts2
7 files changed, 59 insertions, 27 deletions
diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json
index d3ba7a928..799c2c99a 100644
--- a/packages/subproviders/CHANGELOG.json
+++ b/packages/subproviders/CHANGELOG.json
@@ -1,5 +1,28 @@
[
{
+ "timestamp": 1525477860,
+ "version": "0.10.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
+ "version": "0.10.0",
+ "changes": [
+ {
+ "note": "Upgrade web3-provider-engine to 14.0.4",
+ "pr": 555
+ },
+ {
+ "note": "Relax `to` validation in base wallet subprovider for transactions that deploy contracts",
+ "pr": 555
+ }
+ ],
+ "timestamp": 1525428773
+ },
+ {
"version": "0.9.0",
"changes": [
{
diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md
index 7b54b1ad5..22a5f90e8 100644
--- a/packages/subproviders/CHANGELOG.md
+++ b/packages/subproviders/CHANGELOG.md
@@ -5,7 +5,16 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
-## v0.9.0 - _April 12, 2018_
+## v0.10.1 - _May 5, 2018_
+
+ * Dependencies updated
+
+## v0.10.0 - _May 4, 2018_
+
+ * Upgrade web3-provider-engine to 14.0.4 (#555)
+ * Relax `to` validation in base wallet subprovider for transactions that deploy contracts (#555)
+
+## v0.9.0 - _April 11, 2018_
* Refactor RedundantRPCSubprovider into RedundantSubprovider where it now accepts an array of subproviders rather then an array of RPC endpoints (#500)
* Add PrivateKeySubprovider and refactor shared functionality into a base wallet subprovider (#506)
@@ -23,43 +32,43 @@ CHANGELOG
* Introduce `JSONRPCRequestPayloadWithMethod` type (#465)
* Export `ErrorCallback` type. (#465)
-## v0.8.0 - _March 18, 2018_
+## v0.8.0 - _March 17, 2018_
* Export `GanacheSubprovider` and `Subprovider` (#426)
* Make all subproviders to derive from `Subprovider` (#426)
* Add types for `NextCallback`, `OnNextCompleted` (#426)
* Ignore `ganache-core` dependency when using package in a browser environment.
-## v0.7.0 - _March 8, 2018_
+## v0.7.0 - _March 7, 2018_
* Updated legerco packages. Removed node-hid package as a dependency and make it an optional dependency. It is still used in integration tests but is causing problems for users on Linux distros. (#437)
-## v0.6.0 - _March 4, 2018_
+## v0.6.0 - _March 3, 2018_
* Move web3 types from being a devDep to a dep since one cannot use this package without it (#429)
* Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` (#432)
-## v0.5.0 - _February 16, 2018_
+## v0.5.0 - _February 15, 2018_
* Add EmptyWalletSubprovider and FakeGasEstimateSubprovider (#392)
-## v0.4.1 - _February 9, 2018_
+## v0.4.1 - _February 8, 2018_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
-## v0.4.0 - _February 7, 2018_
+## v0.4.0 - _February 6, 2018_
* Added NonceTrackerSubprovider (#355)
* InjectedWeb3Subprovider accepts a Provider in the constructor, previously it was a Web3 object (#363)
-## v0.3.6 - _January 28, 2018_
+## v0.3.6 - _January 27, 2018_
* Return a transaction hash from `_sendTransactionAsync` (#303)
-## v0.3.0 - _December 28, 2017_
+## v0.3.0 - _December 27, 2017_
* Allow LedgerSubprovider to handle `eth_sign` in addition to `personal_sign` RPC requests
-## v0.2.0 - _December 20, 2017_
+## v0.2.0 - _December 19, 2017_
* Improve the performance of address fetching (#271)
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index aaa0f657c..92377f118 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/subproviders",
- "version": "0.9.0",
+ "version": "0.10.1",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"license": "Apache-2.0",
@@ -8,7 +8,7 @@
"build:watch": "tsc -w",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
- "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
+ "lint": "tslint --project .",
"run_mocha_unit": "mocha lib/test/unit/**/*_test.js --timeout 10000 --bail --exit",
"run_mocha_integration": "mocha lib/test/integration/**/*_test.js --timeout 10000 --bail --exit",
"test": "npm run test:unit",
@@ -36,10 +36,10 @@
}
},
"dependencies": {
- "@0xproject/assert": "^0.2.7",
- "@0xproject/types": "^0.6.1",
- "@0xproject/typescript-typings": "^0.2.0",
- "@0xproject/utils": "^0.5.2",
+ "@0xproject/assert": "^0.2.9",
+ "@0xproject/types": "^0.6.3",
+ "@0xproject/typescript-typings": "^0.3.1",
+ "@0xproject/utils": "^0.6.1",
"@ledgerhq/hw-app-eth": "^4.3.0",
"@ledgerhq/hw-transport-u2f": "^4.3.0",
"bip39": "^2.5.0",
@@ -51,12 +51,12 @@
"lodash": "^4.17.4",
"semaphore-async-await": "^1.5.1",
"web3": "^0.20.0",
- "web3-provider-engine": "^13.0.1"
+ "web3-provider-engine": "^14.0.4"
},
"devDependencies": {
- "@0xproject/monorepo-scripts": "^0.1.18",
- "@0xproject/tslint-config": "^0.4.16",
- "@0xproject/utils": "^0.5.2",
+ "@0xproject/monorepo-scripts": "^0.1.19",
+ "@0xproject/tslint-config": "^0.4.17",
+ "@0xproject/utils": "^0.6.1",
"@types/bip39": "^2.4.0",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
diff --git a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts
index 0a9b99ae4..f68d7eb29 100644
--- a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts
+++ b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts
@@ -9,9 +9,10 @@ import { Subprovider } from './subprovider';
export abstract class BaseWalletSubprovider extends Subprovider {
protected static _validateTxParams(txParams: PartialTxParams) {
- assert.isETHAddressHex('to', txParams.to);
+ if (!_.isUndefined(txParams.to)) {
+ assert.isETHAddressHex('to', txParams.to);
+ }
assert.isHexString('nonce', txParams.nonce);
- assert.isHexString('gas', txParams.gas);
}
private static _validateSender(sender: string) {
if (_.isUndefined(sender) || !addressUtils.isAddress(sender)) {
diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts
index 0d6e67bd1..f1c634a77 100644
--- a/packages/subproviders/test/integration/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts
@@ -1,4 +1,4 @@
-import { JSONRPCResponsePayload } from '@0xproject/types';
+import { DoneCallback, JSONRPCResponsePayload } from '@0xproject/types';
import { promisify } from '@0xproject/utils';
import Eth from '@ledgerhq/hw-app-eth';
// HACK: This dependency is optional and tslint skips optional dependencies
@@ -12,7 +12,7 @@ import Web3ProviderEngine = require('web3-provider-engine');
import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
import { LedgerSubprovider } from '../../src';
-import { DoneCallback, LedgerEthereumClient } from '../../src/types';
+import { LedgerEthereumClient } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
import { reportCallbackErrors } from '../utils/report_callback_errors';
diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
index e25cb7eb7..9115186f4 100644
--- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
+++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
@@ -1,4 +1,4 @@
-import { JSONRPCResponsePayload } from '@0xproject/types';
+import { DoneCallback, JSONRPCResponsePayload } from '@0xproject/types';
import * as chai from 'chai';
import * as _ from 'lodash';
import Web3 = require('web3');
@@ -7,7 +7,6 @@ import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
import { RedundantSubprovider } from '../../src';
import { Subprovider } from '../../src/subproviders/subprovider';
-import { DoneCallback } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { ganacheSubprovider } from '../utils/ganache_subprovider';
import { reportCallbackErrors } from '../utils/report_callback_errors';
diff --git a/packages/subproviders/test/utils/report_callback_errors.ts b/packages/subproviders/test/utils/report_callback_errors.ts
index 8a8f4d966..eaefea7c3 100644
--- a/packages/subproviders/test/utils/report_callback_errors.ts
+++ b/packages/subproviders/test/utils/report_callback_errors.ts
@@ -1,4 +1,4 @@
-import { DoneCallback } from '../../src/types';
+import { DoneCallback } from '@0xproject/types';
export const reportCallbackErrors = (done: DoneCallback) => {
return (f: (...args: any[]) => void) => {