From 19495e590edefb4e471cd04b4274e8c21f542f2d Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 7 May 2018 12:54:51 +0200 Subject: [PATCH] Use ui-react-rx & api-rx packages (#27) * Use ui-react-rx & api-rx packages * Install --- packages/app-explorer/src/BestHash.js | 2 +- packages/app-explorer/src/BlockHeaders.js | 2 +- packages/app-explorer/src/index.js | 2 +- packages/app-extrinsics/src/Account.js | 2 +- .../app-extrinsics/src/Selection/Nonce.js | 2 +- packages/app-extrinsics/src/Signer/index.js | 4 +- packages/app-extrinsics/src/Signer/submit.js | 2 +- packages/app-storage/src/Query/cached.js | 2 +- packages/apps/src/Connecting/index.js | 2 +- packages/ui-react-app/package.json | 4 +- packages/ui-react-app/src/index.js | 4 +- packages/ui-react-app/src/types.js | 2 +- yarn.lock | 78 +++++++++---------- 13 files changed, 54 insertions(+), 54 deletions(-) diff --git a/packages/app-explorer/src/BestHash.js b/packages/app-explorer/src/BestHash.js index 672f3833e4..567080d7f0 100644 --- a/packages/app-explorer/src/BestHash.js +++ b/packages/app-explorer/src/BestHash.js @@ -6,7 +6,7 @@ import type { Header } from '@polkadot/primitives/header'; import headerHash from '@polkadot/primitives-codec/header/hash'; -import withApiDiv from '@polkadot/rx-react/with/apiDiv'; +import withApiDiv from '@polkadot/ui-react-rx/with/apiDiv'; import u8aToHexShort from '@polkadot/util/u8a/toHexShort'; export default withApiDiv({ name: 'newHead', section: 'chain' })( diff --git a/packages/app-explorer/src/BlockHeaders.js b/packages/app-explorer/src/BlockHeaders.js index dde0f731f5..5b4fc91f7d 100644 --- a/packages/app-explorer/src/BlockHeaders.js +++ b/packages/app-explorer/src/BlockHeaders.js @@ -6,7 +6,7 @@ import type { Header } from '@polkadot/primitives/header'; import React from 'react'; -import withApiDiv from '@polkadot/rx-react/with/apiDiv'; +import withApiDiv from '@polkadot/ui-react-rx/with/apiDiv'; import BlockHeader from './BlockHeader'; diff --git a/packages/app-explorer/src/index.js b/packages/app-explorer/src/index.js index 907150b94d..440847a1fb 100644 --- a/packages/app-explorer/src/index.js +++ b/packages/app-explorer/src/index.js @@ -8,7 +8,7 @@ import type { I18nProps } from '@polkadot/ui-react-app/types'; import './index.css'; import React from 'react'; -import BestNumber from '@polkadot/rx-react/BestNumber'; +import BestNumber from '@polkadot/ui-react-rx/BestNumber'; import BestHash from './BestHash'; import BlockHeaders from './BlockHeaders'; diff --git a/packages/app-extrinsics/src/Account.js b/packages/app-extrinsics/src/Account.js index 956d12e3e7..2a7e6831df 100644 --- a/packages/app-extrinsics/src/Account.js +++ b/packages/app-extrinsics/src/Account.js @@ -7,7 +7,7 @@ import type { I18nProps } from '@polkadot/ui-react-app/types'; import React from 'react'; import Label from 'semantic-ui-react/dist/es/elements/Label'; -import Balance from '@polkadot/rx-react/Balance'; +import Balance from '@polkadot/ui-react-rx/Balance'; import InputAddress from '@polkadot/ui-react-app/src/InputAddress'; import translate from './translate'; diff --git a/packages/app-extrinsics/src/Selection/Nonce.js b/packages/app-extrinsics/src/Selection/Nonce.js index ae4f7b7592..c3415ecfa8 100644 --- a/packages/app-extrinsics/src/Selection/Nonce.js +++ b/packages/app-extrinsics/src/Selection/Nonce.js @@ -8,7 +8,7 @@ import type { BareProps } from '@polkadot/ui-react-app/types'; import React from 'react'; import Label from 'semantic-ui-react/dist/es/elements/Label'; -import RxNonce from '@polkadot/rx-react/Nonce'; +import RxNonce from '@polkadot/ui-react-rx/Nonce'; type Props = BareProps & { label: string, diff --git a/packages/app-extrinsics/src/Signer/index.js b/packages/app-extrinsics/src/Signer/index.js index 80934e0f71..39c6371e95 100644 --- a/packages/app-extrinsics/src/Signer/index.js +++ b/packages/app-extrinsics/src/Signer/index.js @@ -3,7 +3,7 @@ // of the ISC license. See the LICENSE file for details. // @flow -import type { ApiProps } from '@polkadot/rx-react/types'; +import type { ApiProps } from '@polkadot/ui-react-rx/types'; import type { I18nProps } from '@polkadot/ui-react-app/types'; import type { QueueTx } from '../types'; @@ -12,7 +12,7 @@ import './Signer.css'; import React from 'react'; import Button from 'semantic-ui-react/dist/es/elements/Button'; import Modal from 'semantic-ui-react/dist/es/modules/Modal'; -import withApi from '@polkadot/rx-react/with/api'; +import withApi from '@polkadot/ui-react-rx/with/api'; import translate from '../translate'; import Decoded from './Decoded'; diff --git a/packages/app-extrinsics/src/Signer/submit.js b/packages/app-extrinsics/src/Signer/submit.js index ef54e58d78..41cf037626 100644 --- a/packages/app-extrinsics/src/Signer/submit.js +++ b/packages/app-extrinsics/src/Signer/submit.js @@ -3,7 +3,7 @@ // of the ISC license. See the LICENSE file for details. // @flow -import type { RxApiInterface } from '@polkadot/rx-api/types'; +import type { RxApiInterface } from '@polkadot/api-rx/types'; import type { QueueTx } from '../types'; import encodeCall from '@polkadot/extrinsics-codec/encode/call'; diff --git a/packages/app-storage/src/Query/cached.js b/packages/app-storage/src/Query/cached.js index dc91c0d9cf..20c86e9813 100644 --- a/packages/app-storage/src/Query/cached.js +++ b/packages/app-storage/src/Query/cached.js @@ -6,7 +6,7 @@ import type BN from 'bn.js'; import type { StorageDef$Key } from '@polkadot/storage/types'; -import withStorageDiv from '@polkadot/rx-react/with/storageDiv'; +import withStorageDiv from '@polkadot/ui-react-rx/with/storageDiv'; import u8aToHexShort from '@polkadot/util/u8a/toHexShort'; import isU8a from '@polkadot/util/is/u8a'; diff --git a/packages/apps/src/Connecting/index.js b/packages/apps/src/Connecting/index.js index fae73e513b..8b19037244 100644 --- a/packages/apps/src/Connecting/index.js +++ b/packages/apps/src/Connecting/index.js @@ -8,7 +8,7 @@ import type { I18nProps } from '@polkadot/ui-react-app/types'; import './Connecting.css'; import React from 'react'; -import withApiCall from '@polkadot/rx-react/with/apiCall'; +import withApiCall from '@polkadot/ui-react-rx/with/apiCall'; import translate from '../translate'; diff --git a/packages/ui-react-app/package.json b/packages/ui-react-app/package.json index 47df18e6c3..2f77e556d5 100644 --- a/packages/ui-react-app/package.json +++ b/packages/ui-react-app/package.json @@ -12,9 +12,9 @@ }, "dependencies": { "@polkadot/extrinsics-substrate": "^0.12.7", - "@polkadot/rx-react": "^0.6.1", "@polkadot/storage-substrate": "^0.12.7", - "@polkadot/ui-react": "^0.10.3", + "@polkadot/ui-react": "^0.11.1", + "@polkadot/ui-react-rx": "^0.11.1", "@polkadot/util": "^0.19.5", "@polkadot/util-keyring": "^0.19.5", "i18next": "^11.1.1", diff --git a/packages/ui-react-app/src/index.js b/packages/ui-react-app/src/index.js index 2a55abcffc..b6517c5bfd 100644 --- a/packages/ui-react-app/src/index.js +++ b/packages/ui-react-app/src/index.js @@ -4,7 +4,7 @@ // @flow import type { ProviderInterface } from '@polkadot/api-provider/types'; -import type { RxApiInterface } from '@polkadot/rx-api/types'; +import type { RxApiInterface } from '@polkadot/api-rx/types'; import type { BareProps } from './types'; import './i18n'; @@ -13,7 +13,7 @@ import './styles'; import React from 'react'; import ReactDOM from 'react-dom'; import { HashRouter } from 'react-router-dom'; -import Api from '@polkadot/rx-react/Api'; +import Api from '@polkadot/ui-react-rx/Api'; type Props = BareProps & { api?: RxApiInterface, diff --git a/packages/ui-react-app/src/types.js b/packages/ui-react-app/src/types.js index ebdc2eff0e..8de569b892 100644 --- a/packages/ui-react-app/src/types.js +++ b/packages/ui-react-app/src/types.js @@ -3,7 +3,7 @@ // of the ISC license. See the LICENSE file for details. // @flow -import type { RxApiInterface } from '@polkadot/rx-api/types'; +import type { RxApiInterface } from '@polkadot/api-rx/types'; export type BareProps = { className?: string, diff --git a/yarn.lock b/yarn.lock index 9d23daa3cc..d5dc1285d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -622,23 +622,23 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@polkadot/api-format@^0.9.16": - version "0.9.16" - resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.9.16.tgz#23c0f2b913f7b88efb1df239fbbe9a8d04d1e1e9" +"@polkadot/api-format@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.10.1.tgz#7e9f734b6736b06b67fe1fc97463544c3813308f" dependencies: "@polkadot/primitives-json" "^0.12.7" "@polkadot/util" "^0.19.5" babel-runtime "^6.26.0" -"@polkadot/api-jsonrpc@^0.9.16": - version "0.9.16" - resolved "https://registry.yarnpkg.com/@polkadot/api-jsonrpc/-/api-jsonrpc-0.9.16.tgz#6b9781ae3bcefca5df31fc09131d231ae7c0f973" +"@polkadot/api-jsonrpc@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-jsonrpc/-/api-jsonrpc-0.10.1.tgz#8f5e49caebb913bb4d37b3df3364449a4656333a" dependencies: babel-runtime "^6.26.0" -"@polkadot/api-provider@^0.9.16": - version "0.9.16" - resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.9.16.tgz#02f8de913f4bc101aaf99f3bb4e6ed0164e26f82" +"@polkadot/api-provider@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.10.1.tgz#7a16b3c4ddadd30ea9369231edd10cff5a65f230" dependencies: "@polkadot/storage-substrate" "^0.12.7" "@polkadot/util" "^0.19.5" @@ -649,13 +649,21 @@ isomorphic-fetch "^2.2.1" websocket "^1.0.25" -"@polkadot/api@^0.9.16": - version "0.9.16" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.9.16.tgz#ebfcfe11b005e605f435ff833b004976eb68e2ca" +"@polkadot/api-rx@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.10.1.tgz#7d5b44efa2e61cdda409b80dc67940d35ebcba4e" dependencies: - "@polkadot/api-format" "^0.9.16" - "@polkadot/api-jsonrpc" "^0.9.16" - "@polkadot/api-provider" "^0.9.16" + "@polkadot/api" "^0.10.1" + "@polkadot/api-provider" "^0.10.1" + rxjs "^5.5.10" + +"@polkadot/api@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.10.1.tgz#ae9d3576e804654fe11a610a17e418a9e5f9810b" + dependencies: + "@polkadot/api-format" "^0.10.1" + "@polkadot/api-jsonrpc" "^0.10.1" + "@polkadot/api-provider" "^0.10.1" "@polkadot/util" "^0.19.5" babel-runtime "^6.26.0" @@ -769,23 +777,6 @@ "@polkadot/util" "^0.19.5" babel-runtime "^6.26.0" -"@polkadot/rx-api@^0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/rx-api/-/rx-api-0.6.1.tgz#a99d167d7a5046d5cff7bdab07da3e147f1c44a7" - dependencies: - "@polkadot/api" "^0.9.16" - "@polkadot/api-provider" "^0.9.16" - rxjs "^5.5.10" - -"@polkadot/rx-react@^0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@polkadot/rx-react/-/rx-react-0.6.1.tgz#805776ee938df1621153ec3e16e674b6eabdc102" - dependencies: - "@polkadot/primitives" "^0.12.7" - "@polkadot/rx-api" "^0.6.1" - "@polkadot/storage-substrate" "^0.12.7" - "@polkadot/util" "^0.19.5" - "@polkadot/storage-substrate@^0.12.7": version "0.12.7" resolved "https://registry.yarnpkg.com/@polkadot/storage-substrate/-/storage-substrate-0.12.7.tgz#1368fdc68016b10a1ac452f17b1bca48067ac4d4" @@ -802,18 +793,27 @@ "@polkadot/util" "^0.19.5" babel-runtime "^6.26.0" -"@polkadot/ui-identicon@^0.10.3": - version "0.10.3" - resolved "https://registry.yarnpkg.com/@polkadot/ui-identicon/-/ui-identicon-0.10.3.tgz#6785c084f18ba26110c8db00d9dc0d0e0dc6c1ae" +"@polkadot/ui-identicon@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@polkadot/ui-identicon/-/ui-identicon-0.11.1.tgz#4b8e5c46995acb4b94539f44ba2b6bb02e134cbd" dependencies: babel-runtime "^6.26.0" color "^3.0.0" -"@polkadot/ui-react@^0.10.3": - version "0.10.3" - resolved "https://registry.yarnpkg.com/@polkadot/ui-react/-/ui-react-0.10.3.tgz#957f6d6bb9f5d1a44586fa4a44a00edd292387f1" +"@polkadot/ui-react-rx@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@polkadot/ui-react-rx/-/ui-react-rx-0.11.1.tgz#fa975024e17321084eb832c83d9168636107815c" dependencies: - "@polkadot/ui-identicon" "^0.10.3" + "@polkadot/api-rx" "^0.10.1" + "@polkadot/primitives" "^0.12.7" + "@polkadot/storage-substrate" "^0.12.7" + "@polkadot/util" "^0.19.5" + +"@polkadot/ui-react@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@polkadot/ui-react/-/ui-react-0.11.1.tgz#edc116a6e6ef947dc06b1808a2abed51853ca5cb" + dependencies: + "@polkadot/ui-identicon" "^0.11.1" babel-runtime "^6.26.0" "@polkadot/util-crypto@^0.19.5":