From abb62d5c2a5e9138aa5b07fd9a929e4dd70610f6 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 28 Jul 2017 17:56:48 +0200 Subject: [PATCH] Ui 2 parity build fixes (#6182) * Update API reference * Deprecation warning * Add missing parity-reactive-ui * Add dapps to packages/dapps * Add parity.js dependency * Update with js-ui with compiled bundle.js --- js/package-lock.json | 52 ++++++++++++++++--- js/package.json | 4 +- js/packages/etherscan/README.md | 34 ------------ js/packages/etherscan/account.js | 75 --------------------------- js/packages/etherscan/account.spec.js | 71 ------------------------- js/packages/etherscan/call.js | 47 ----------------- js/packages/etherscan/helpers.spec.js | 38 -------------- js/packages/etherscan/index.js | 28 ---------- js/packages/etherscan/library.js | 33 ------------ js/packages/etherscan/links.js | 55 -------------------- js/packages/etherscan/links.spec.js | 57 -------------------- js/packages/etherscan/package.json | 33 ------------ js/packages/etherscan/stats.js | 36 ------------- js/packages/etherscan/stats.spec.js | 37 ------------- js/webpack/app.js | 1 + js/webpack/libraries.js | 1 + js/webpack/npm.js | 1 + js/webpack/test.js | 1 + 18 files changed, 50 insertions(+), 554 deletions(-) delete mode 100644 js/packages/etherscan/README.md delete mode 100644 js/packages/etherscan/account.js delete mode 100644 js/packages/etherscan/account.spec.js delete mode 100644 js/packages/etherscan/call.js delete mode 100644 js/packages/etherscan/helpers.spec.js delete mode 100644 js/packages/etherscan/index.js delete mode 100644 js/packages/etherscan/library.js delete mode 100644 js/packages/etherscan/links.js delete mode 100644 js/packages/etherscan/links.spec.js delete mode 100644 js/packages/etherscan/package.json delete mode 100644 js/packages/etherscan/stats.js delete mode 100644 js/packages/etherscan/stats.spec.js diff --git a/js/package-lock.json b/js/package-lock.json index 398f44223..6bc921999 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -94,9 +94,26 @@ } }, "@parity/etherscan": { - "version": "file:packages/etherscan", + "version": "github:paritytech/js-etherscan#efe859ac7d2a8a3cc05e01c689b7fa58f47f8b87", "requires": { - "node-fetch": "1.6.3" + "@parity/api": "github:paritytech/js-api#1c7cc5561c4e8db0d0b58f22d8bc8baa243909a5", + "bignumber.js": "3.0.1", + "es6-promise": "4.1.1", + "node-fetch": "1.6.3", + "qs": "6.5.0", + "whatwg-fetch": "2.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", + "integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==" + }, + "whatwg-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", + "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" + } } }, "@parity/jsonrpc": { @@ -144,26 +161,40 @@ } }, "@parity/ui": { - "version": "github:paritytech/js-ui#315bec33a621184db1bd235f115f8f24e8c63192", + "version": "github:paritytech/js-ui#73b6241d727afe6b1bc04d7b093093a5d542c5c8", "requires": { + "@parity/api": "github:paritytech/js-api#1c7cc5561c4e8db0d0b58f22d8bc8baa243909a5", + "@parity/etherscan": "github:paritytech/js-etherscan#efe859ac7d2a8a3cc05e01c689b7fa58f47f8b87", + "@parity/shared": "github:paritytech/js-shared#a83c71946d30d5b3bf976860a676add29c48ee24", "bignumber.js": "3.0.1", "brace": "0.9.0", "date-difference": "1.0.0", + "eventemitter3": "2.0.3", "file-saver": "1.3.3", "geopattern": "1.2.3", "js-sha3": "0.5.5", "keycode": "2.1.9", "lodash": "4.17.2", + "mobx": "2.6.4", + "mobx-react": "4.0.3", "moment": "2.17.0", "qrcode-generator": "1.2.0", + "react": "15.6.1", "react-ace": "4.1.0", "react-copy-to-clipboard": "4.2.3", "react-datetime": "2.8.10", + "react-dom": "15.6.1", "react-dropzone": "3.7.3", "react-event-listener": "0.4.5", + "react-intl": "2.1.5", "react-portal": "3.0.0", "react-qr-reader": "1.1.3", + "react-router": "3.0.0", + "react-router-redux": "4.0.7", + "react-tap-event-plugin": "2.0.1", + "react-tooltip": "3.2.2", "recharts": "0.15.2", + "redux": "3.6.0", "semantic-ui-css": "2.2.11", "semantic-ui-react": "0.71.2", "zxcvbn": "4.4.1" @@ -10479,7 +10510,7 @@ "lodash": "4.17.2", "mkdirp": "0.5.1", "propagate": "0.4.0", - "qs": "6.3.2" + "qs": "6.5.0" } }, "node-abi": { @@ -12178,10 +12209,9 @@ "integrity": "sha1-8YZUY/F4ZUfrsJDnxDC/PK9DoBc=" }, "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", + "integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg==" }, "query-string": { "version": "4.3.4", @@ -13119,6 +13149,12 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", + "dev": true + }, "tunnel-agent": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", diff --git a/js/package.json b/js/package.json index 487b2c36d..11e2e70db 100644 --- a/js/package.json +++ b/js/package.json @@ -162,11 +162,11 @@ "dependencies": { "@parity/api": "paritytech/js-api#1c7cc5561c4e8db0d0b58f22d8bc8baa243909a5", "@parity/dapps": "file:packages/dapps", - "@parity/etherscan": "file:packages/etherscan", + "@parity/etherscan": "paritytech/js-etherscan#efe859ac7d2a8a3cc05e01c689b7fa58f47f8b87", "@parity/ledger": "file:packages/ledger", "@parity/shapeshift": "file:packages/shapeshift", "@parity/shared": "paritytech/js-shared#a83c71946d30d5b3bf976860a676add29c48ee24", - "@parity/ui": "paritytech/js-ui#315bec33a621184db1bd235f115f8f24e8c63192", + "@parity/ui": "paritytech/js-ui#73b6241d727afe6b1bc04d7b093093a5d542c5c8", "@parity/wordlist": "1.0.1", "es6-error": "4.0.0", "es6-promise": "4.0.5", diff --git a/js/packages/etherscan/README.md b/js/packages/etherscan/README.md deleted file mode 100644 index 6c60dcb12..000000000 --- a/js/packages/etherscan/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# @parity/etherscan - -A thin, lightweight promise wrapper for the api.etherscan.io/apis service, exposing a common endpoint for use in JavaScript applications. - -[https://github.com/paritytech/parity/tree/master/js/packages/3rdpartyetherscan](https://github.com/paritytech/parity/tree/master/js/packages/etherscan) - -## usage - -installation - - -``` -npm install --save @parity/etherscan -``` - -Usage - - -``` -const etherscan = require('@parity/etherscan'); - -// api calls goes here -``` - -## api - -account (exposed on etherscan.account) - - -- `balance(address)` -- `balances(addresses)` (array or addresses) -- `transactions(address, page)` (page offset starts at 0, returns 25) - -stats (exposed on etherscan.stats) - - -- `price()` -- `supply()` diff --git a/js/packages/etherscan/account.js b/js/packages/etherscan/account.js deleted file mode 100644 index 1ed3838bf..000000000 --- a/js/packages/etherscan/account.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import BigNumber from 'bignumber.js'; - -const PAGE_SIZE = 25; - -import util from '@parity/api/util'; -import { call } from './call'; - -function _call (method, params, test, netVersion) { - return call('account', method, params, test, netVersion); -} - -function balance (address, test, netVersion) { - return _call('balance', { - address: address, - tag: 'latest' - }, test, netVersion).then((balance) => { - // same format as balancemulti below - return { - account: address, - balance: balance - }; - }); -} - -function balances (addresses, test, netVersion) { - return _call('balancemulti', { - address: addresses.join(','), - tag: 'latest' - }, test, netVersion); -} - -function transactions (address, page, test, netVersion) { - // page offset from 0 - return _call('txlist', { - address: address, - offset: PAGE_SIZE, - page: (page || 0) + 1, - sort: 'desc' - }, test, netVersion).then((transactions) => { - return transactions.map((tx) => { - return { - blockNumber: new BigNumber(tx.blockNumber || 0), - from: util.toChecksumAddress(tx.from), - hash: tx.hash, - timeStamp: tx.timeStamp, - to: util.toChecksumAddress(tx.to), - value: tx.value - }; - }); - }); -} - -const account = { - balance, - balances, - transactions -}; - -export { account }; diff --git a/js/packages/etherscan/account.spec.js b/js/packages/etherscan/account.spec.js deleted file mode 100644 index 54eff9f9c..000000000 --- a/js/packages/etherscan/account.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -const etherscan = require('./'); - -const TESTADDR = '0xbf885e2b55c6bcc84556a3c5f07d3040833c8d00'; - -describe.skip('etherscan/account', function () { - this.timeout(60 * 1000); - - const checkBalance = function (balance, addr) { - expect(balance).to.be.ok; - expect(balance.account).to.equal(addr); - expect(balance.balance).to.be.ok; - }; - - it('retrieves an account balance', () => { - return etherscan.account - .balance(TESTADDR) - .then((balance) => { - checkBalance(balance, TESTADDR); - }); - }); - - it('retrieves multi account balances', () => { - const addresses = ['0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae', TESTADDR]; - - return etherscan.account - .balances(addresses) - .then((balances) => { - expect(balances).to.be.ok; - expect(balances.length).to.equal(2); - balances.forEach((balance, idx) => { - checkBalance(balance, addresses[idx]); - }); - }); - }); - - describe('transactions', () => { - it('retrieves a list of transactions (default)', () => { - return etherscan.account - .transactions(TESTADDR) - .then((transactions) => { - expect(transactions).to.be.ok; - expect(transactions.length).to.equal(25); - }); - }); - - it('retrieves a list of transactions (page 1)', () => { - return etherscan.account - .transactions(TESTADDR, 1) - .then((transactions) => { - expect(transactions).to.be.ok; - expect(transactions.length).to.equal(25); - }); - }); - }); -}); diff --git a/js/packages/etherscan/call.js b/js/packages/etherscan/call.js deleted file mode 100644 index 069627d78..000000000 --- a/js/packages/etherscan/call.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import { stringify } from 'qs'; -import { apiLink } from './links'; - -const options = { - method: 'GET', - headers: { - 'Accept': 'application/json' - } -}; - -export function call (module, action, _params, test, netVersion) { - const query = stringify(Object.assign({ - module, action - }, _params || {})); - - return fetch(apiLink(query, test, netVersion), options) - .then((response) => { - if (!response.ok) { - throw { code: response.status, message: response.statusText }; // eslint-disable-line - } - - return response.json(); - }) - .then((result) => { - if (result.message === 'NOTOK') { - throw { code: -1, message: result.result }; // eslint-disable-line - } - - return result.result; - }); -} diff --git a/js/packages/etherscan/helpers.spec.js b/js/packages/etherscan/helpers.spec.js deleted file mode 100644 index fa29c3d97..000000000 --- a/js/packages/etherscan/helpers.spec.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import nock from 'nock'; -import { stringify } from 'qs'; - -import { url } from './links'; - -function mockget (requests, test, netVersion) { - let scope = nock(url(test, netVersion)); - - requests.forEach((request) => { - scope = scope - .get(`/api?${stringify(request.query)}`) - .reply(request.code || 200, () => { - return { result: request.reply }; - }); - }); - - return scope; -} - -export { - mockget -}; diff --git a/js/packages/etherscan/index.js b/js/packages/etherscan/index.js deleted file mode 100644 index 594e833a8..000000000 --- a/js/packages/etherscan/index.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import { account } from './account'; -import { stats } from './stats'; -import { txLink, addressLink } from './links'; - -const etherscan = { - account: account, - stats: stats, - txLink: txLink, - addressLink: addressLink -}; - -export default etherscan; diff --git a/js/packages/etherscan/library.js b/js/packages/etherscan/library.js deleted file mode 100644 index f0cd70158..000000000 --- a/js/packages/etherscan/library.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import es6Promise from 'es6-promise'; -es6Promise.polyfill(); - -const isNode = typeof global !== 'undefined' && typeof global !== 'undefined'; -const isBrowser = typeof self !== 'undefined' && typeof self.window !== 'undefined'; - -if (isBrowser) { - require('whatwg-fetch'); -} - -if (isNode) { - global.fetch = require('node-fetch'); -} - -import Etherscan from './'; - -export default Etherscan; diff --git a/js/packages/etherscan/links.js b/js/packages/etherscan/links.js deleted file mode 100644 index 3b08d60e8..000000000 --- a/js/packages/etherscan/links.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -// NOTE: Keep 'isTestnet' for backwards library compatibility -const getUrlPrefix = (isTestnet = false, netVersion = '0', defaultPrefix = '') => { - if (isTestnet) { - return 'ropsten.'; - } - - switch (netVersion) { - case '1': - return defaultPrefix; - - case '3': - return 'ropsten.'; - - case '4': - return 'rinkeby.'; - - case '42': - return 'kovan.'; - - default: - return 'testnet.'; - } -}; - -export const url = (isTestnet = false, netVersion = '0', defaultPrefix = '') => { - return `https://${getUrlPrefix(isTestnet, netVersion, defaultPrefix)}etherscan.io`; -}; - -export const txLink = (hash, isTestnet = false, netVersion = '0') => { - return `${url(isTestnet, netVersion)}/tx/${hash}`; -}; - -export const addressLink = (address, isTestnet = false, netVersion = '0') => { - return `${url(isTestnet, netVersion)}/address/${address}`; -}; - -export const apiLink = (query, isTestnet = false, netVersion = '0') => { - return `${url(isTestnet, netVersion, 'api.')}/api?${query}`; -}; diff --git a/js/packages/etherscan/links.spec.js b/js/packages/etherscan/links.spec.js deleted file mode 100644 index c906940cb..000000000 --- a/js/packages/etherscan/links.spec.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -const { url, txLink, addressLink, apiLink } = require('./links'); - -describe('etherscan/links', function () { - it('builds link with a prefix', () => { - expect(url(false, '1', 'api.')).to.be.equal('https://api.etherscan.io'); - }); - - it('builds link to main network', () => { - expect(url(false, '1')).to.be.equal('https://etherscan.io'); - }); - - it('builds link to ropsten', () => { - expect(url(false, '3')).to.be.equal('https://ropsten.etherscan.io'); - expect(url(true)).to.be.equal('https://ropsten.etherscan.io'); - }); - - it('builds link to kovan', () => { - expect(url(false, '42')).to.be.equal('https://kovan.etherscan.io'); - }); - - it('builds link to rinkeby', () => { - expect(url(false, '4')).to.be.equal('https://rinkeby.etherscan.io'); - }); - - it('builds link to the testnet selector for unknown networks', () => { - expect(url(false, '10042')).to.be.equal('https://testnet.etherscan.io'); - expect(url(false, '51224')).to.be.equal('https://testnet.etherscan.io'); - }); - - it('builds transaction link', () => { - expect(txLink('aTxHash', false, '1')).to.be.equal('https://etherscan.io/tx/aTxHash'); - }); - - it('builds address link', () => { - expect(addressLink('anAddress', false, '1')).to.be.equal('https://etherscan.io/address/anAddress'); - }); - - it('builds api link', () => { - expect(apiLink('answer=42', false, '1')).to.be.equal('https://api.etherscan.io/api?answer=42'); - }); -}); diff --git a/js/packages/etherscan/package.json b/js/packages/etherscan/package.json deleted file mode 100644 index 014587a05..000000000 --- a/js/packages/etherscan/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@parity/etherscan", - "description": "The Parity Promise-based library for interfacing with Etherscan over HTTP", - "version": "1.99.99", - "main": "library.js", - "author": "Parity Team ", - "maintainers": [ - "Jaco Greeff" - ], - "contributors": [], - "license": "GPL-3.0", - "repository": { - "type": "git", - "url": "git+https://github.com/paritytech/js-etherscan.git" - }, - "keywords": [ - "Ethereum", - "ABI", - "API", - "RPC", - "Parity", - "Promise" - ], - "scripts": { - }, - "devDependencies": { - "chai": "3.5.0", - "mocha": "3.2.0" - }, - "dependencies": { - "node-fetch": "~1.6.3" - } -} diff --git a/js/packages/etherscan/stats.js b/js/packages/etherscan/stats.js deleted file mode 100644 index 282376c5e..000000000 --- a/js/packages/etherscan/stats.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import { call } from './call'; - -function _call (action, test) { - return call('stats', action, null, test); -} - -function price (test = false) { - return _call('ethprice', test); -} - -function supply (test = false) { - return _call('ethsupply', test); -} - -const stats = { - price: price, - supply: supply -}; - -export { stats }; diff --git a/js/packages/etherscan/stats.spec.js b/js/packages/etherscan/stats.spec.js deleted file mode 100644 index d837f17f7..000000000 --- a/js/packages/etherscan/stats.spec.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -const etherscan = require('./'); - -describe.skip('etherscan/stats', function () { - this.timeout(60 * 1000); - - it('retrieves the latest price', () => { - return etherscan.stats - .price() - .then((price) => { - expect(price).to.be.ok; - }); - }); - - it('retrieves the ether total', () => { - return etherscan.stats - .supply() - .then((supply) => { - expect(supply).to.be.ok; - }); - }); -}); diff --git a/js/webpack/app.js b/js/webpack/app.js index af53afa8f..d3cee56d3 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -156,6 +156,7 @@ module.exports = { '~': path.resolve(__dirname, '..'), '@parity/abi': path.resolve(__dirname, '../node_modules/@parity/abi'), '@parity/api': path.resolve(__dirname, '../node_modules/@parity/api'), + '@parity/etherscan': path.resolve(__dirname, '../node_modules/@parity/etherscan'), '@parity/jsonrpc': path.resolve(__dirname, '../node_modules/@parity/jsonrpc'), '@parity/parity.js': path.resolve(__dirname, '../node_modules/@parity/parity.js'), '@parity/shared': path.resolve(__dirname, '../node_modules/@parity/shared'), diff --git a/js/webpack/libraries.js b/js/webpack/libraries.js index b5226b1dd..42eb21b33 100644 --- a/js/webpack/libraries.js +++ b/js/webpack/libraries.js @@ -45,6 +45,7 @@ module.exports = { '~': path.resolve(__dirname, '..'), '@parity/abi': path.resolve(__dirname, '../node_modules/@parity/abi'), '@parity/api': path.resolve(__dirname, '../node_modules/@parity/api'), + '@parity/etherscan': path.resolve(__dirname, '../node_modules/@parity/etherscan'), '@parity/jsonrpc': path.resolve(__dirname, '../node_modules/@parity/jsonrpc'), '@parity/shared': path.resolve(__dirname, '../node_modules/@parity/shared'), '@parity/ui': path.resolve(__dirname, '../node_modules/@parity/ui'), diff --git a/js/webpack/npm.js b/js/webpack/npm.js index bf6126da8..3f09e3722 100644 --- a/js/webpack/npm.js +++ b/js/webpack/npm.js @@ -78,6 +78,7 @@ module.exports = { '~': path.resolve(__dirname, '..'), '@parity/abi': path.resolve(__dirname, '../node_modules/@parity/abi'), '@parity/api': path.resolve(__dirname, '../node_modules/@parity/api'), + '@parity/etherscan': path.resolve(__dirname, '../node_modules/@parity/etherscan'), '@parity/jsonrpc': path.resolve(__dirname, '../node_modules/@parity/jsonrpc'), '@parity/shared': path.resolve(__dirname, '../node_modules/@parity/shared'), '@parity/ui': path.resolve(__dirname, '../node_modules/@parity/ui'), diff --git a/js/webpack/test.js b/js/webpack/test.js index b20a41539..f01eb4e24 100644 --- a/js/webpack/test.js +++ b/js/webpack/test.js @@ -23,6 +23,7 @@ module.exports = { '~': path.resolve(__dirname, '..'), '@parity/abi': path.resolve(__dirname, '../node_modules/@parity/abi'), '@parity/api': path.resolve(__dirname, '../node_modules/@parity/api'), + '@parity/etherscan': path.resolve(__dirname, '../node_modules/@parity/etherscan'), '@parity/jsonrpc': path.resolve(__dirname, '../node_modules/@parity/jsonrpc'), '@parity/shared': path.resolve(__dirname, '../node_modules/@parity/shared'), '@parity/ui': path.resolve(__dirname, '../node_modules/@parity/ui'),