diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-12 07:56:13 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-12 07:56:13 +0800 |
commit | faedd2fa0b2582ea24ca4624e13ea7466de18408 (patch) | |
tree | b5e02ec65e8ae5298761f07eae18df145024bb16 /packages/website | |
parent | 41bd0e30d6d0a18530e31133efe57d35e3360ebd (diff) | |
parent | c47fb8f9a83d409c092dd7449054fa16cf0fa1c9 (diff) | |
download | dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.tar dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.tar.gz dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.tar.bz2 dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.tar.lz dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.tar.xz dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.tar.zst dexon-sol-tools-faedd2fa0b2582ea24ca4624e13ea7466de18408.zip |
Merge branch 'development' into fix/docImprovements
* development: (31 commits)
Prettier ignore Metacoin artifacts
Publish
Updated CHANGELOGS
Improve deployer error message
Fix 0x.js tests
Fix lint issue
Simply export
Move NULL_BYTES to @0xproject/utils
Simplify the tests
Fix lint error
Add step to publishing that upload staging doc jsons, deploys staging website, opens every docs page and asks the dev to confirm that each one renders properly before publishing
Fix web3Wrapper build command
Add top-level `yarn lerna:stage_docs` to upload docJsons to the staging S3 bucket for all packages with a docs page
Refactor publish script to have it's main execution body be lean and discrete steps
Removed unused command
Remove 0x.js test artifacts
Fix tslint
Move migrations into separate monorepo subpackage and hook it up to 0x.js and contracts
Remove unused var
Refactor RedundantRpcSubprovider into RedundantSubprovider
...
# Conflicts:
# packages/react-docs/CHANGELOG.json
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/package.json | 20 | ||||
-rw-r--r-- | packages/website/ts/blockchain.ts | 25 |
2 files changed, 29 insertions, 16 deletions
diff --git a/packages/website/package.json b/packages/website/package.json index 7d0c68b47..a8011dc8d 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/website", - "version": "0.0.24", + "version": "0.0.25", "private": true, "description": "Website and 0x portal dapp", "scripts": { @@ -8,23 +8,19 @@ "clean": "shx rm -f public/bundle*", "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", "dev": "webpack-dev-server --content-base public --https", - "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../website/contracts; done;", "deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", "deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" }, - "config": { - "artifacts": "Mintable" - }, "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^0.35.0", - "@0xproject/react-docs": "^0.0.6", - "@0xproject/react-shared": "^0.1.1", - "@0xproject/subproviders": "^0.8.4", - "@0xproject/typescript-typings": "^0.0.3", - "@0xproject/utils": "^0.5.0", - "@0xproject/web3-wrapper": "^0.5.0", + "0x.js": "^0.36.0", + "@0xproject/react-docs": "^0.0.7", + "@0xproject/react-shared": "^0.1.2", + "@0xproject/subproviders": "^0.8.5", + "@0xproject/typescript-typings": "^0.1.0", + "@0xproject/utils": "^0.5.1", + "@0xproject/web3-wrapper": "^0.6.0", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index fd34ab82d..7d79542a3 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -21,7 +21,8 @@ import { ledgerEthereumBrowserClientFactoryAsync, LedgerSubprovider, LedgerWalletSubprovider, - RedundantRPCSubprovider, + RedundantSubprovider, + Subprovider, } from '@0xproject/subproviders'; import { Provider } from '@0xproject/types'; import { BigNumber, intervalUtils, logUtils, promisify } from '@0xproject/utils'; @@ -54,6 +55,7 @@ import { utils } from 'ts/utils/utils'; import Web3 = require('web3'); import ProviderEngine = require('web3-provider-engine'); import FilterSubprovider = require('web3-provider-engine/subproviders/filters'); +import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); import * as MintableArtifacts from '../contracts/Mintable.json'; @@ -98,7 +100,12 @@ export class Blockchain { provider = new ProviderEngine(); provider.addProvider(new InjectedWeb3Subprovider(injectedWeb3.currentProvider)); provider.addProvider(new FilterSubprovider()); - provider.addProvider(new RedundantRPCSubprovider(publicNodeUrlsIfExistsForNetworkId)); + const rpcSubproviders = _.map(publicNodeUrlsIfExistsForNetworkId, publicNodeUrl => { + return new RpcSubprovider({ + rpcUrl: publicNodeUrl, + }); + }); + provider.addProvider(new RedundantSubprovider(rpcSubproviders as Subprovider[])); provider.start(); } else if (doesInjectedWeb3Exist) { // Since no public node for this network, all requests go to injectedWeb3 instance @@ -110,7 +117,12 @@ export class Blockchain { provider = new ProviderEngine(); provider.addProvider(new FilterSubprovider()); const networkId = configs.IS_MAINNET_ENABLED ? constants.NETWORK_ID_MAINNET : constants.NETWORK_ID_KOVAN; - provider.addProvider(new RedundantRPCSubprovider(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkId])); + const rpcSubproviders = _.map(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkId], publicNodeUrl => { + return new RpcSubprovider({ + rpcUrl: publicNodeUrl, + }); + }); + provider.addProvider(new RedundantSubprovider(rpcSubproviders as Subprovider[])); provider.start(); } @@ -201,7 +213,12 @@ export class Blockchain { this._ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs); provider.addProvider(this._ledgerSubprovider); provider.addProvider(new FilterSubprovider()); - provider.addProvider(new RedundantRPCSubprovider(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkId])); + const rpcSubproviders = _.map(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkId], publicNodeUrl => { + return new RpcSubprovider({ + rpcUrl: publicNodeUrl, + }); + }); + provider.addProvider(new RedundantSubprovider(rpcSubproviders as Subprovider[])); provider.start(); this.networkId = networkId; this._dispatcher.updateNetworkId(this.networkId); |