diff --git a/packages/app-example/package.json b/packages/app-example/package.json index b38ef6b738..c54daec245 100644 --- a/packages/app-example/package.json +++ b/packages/app-example/package.json @@ -11,9 +11,9 @@ "license": "ISC", "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/storage": "^0.27.9", + "@polkadot/storage": "^0.27.12", "@polkadot/ui-react": "^0.19.27", "@polkadot/ui-react-rx": "^0.19.27", - "@polkadot/util-keyring": "^0.27.9" + "@polkadot/util-keyring": "^0.27.12" } } diff --git a/packages/app-explorer/package.json b/packages/app-explorer/package.json index 51f4295a57..d6ab553d35 100644 --- a/packages/app-explorer/package.json +++ b/packages/app-explorer/package.json @@ -16,8 +16,8 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/primitives": "^0.27.9", + "@polkadot/primitives": "^0.27.12", "@polkadot/ui-app": "^0.19.27", - "@polkadot/util-crypto": "^0.27.9" + "@polkadot/util-crypto": "^0.27.12" } } diff --git a/packages/app-extrinsics/package.json b/packages/app-extrinsics/package.json index a740a4b7ed..562c79a075 100644 --- a/packages/app-extrinsics/package.json +++ b/packages/app-extrinsics/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/extrinsics": "^0.27.9", + "@polkadot/extrinsics": "^0.27.12", "@polkadot/ui-app": "^0.19.27", "@polkadot/ui-signer": "^0.19.27", "react-dropzone": "^4.2.9" diff --git a/packages/app-rpc/src/Account.tsx b/packages/app-rpc/src/Account.tsx index b5dbd95bce..93270e799c 100644 --- a/packages/app-rpc/src/Account.tsx +++ b/packages/app-rpc/src/Account.tsx @@ -94,8 +94,9 @@ class Account extends React.PureComponent { ); } - onChangeNonce = (nonce: BN): void => { + onChangeNonce = (_nonce: BN): void => { const { onChange } = this.props; + const nonce = _nonce || new BN(0); this.setState({ nonce }, () => onChange(this.state.publicKey, nonce) diff --git a/packages/app-rpc/src/Selection.tsx b/packages/app-rpc/src/Selection.tsx index 0d145200f9..fc15e0219c 100644 --- a/packages/app-rpc/src/Selection.tsx +++ b/packages/app-rpc/src/Selection.tsx @@ -104,7 +104,7 @@ class Selection extends React.PureComponent { return { isValid, rpc, - nonce, + nonce: nonce || new BN(0), publicKey, values }; diff --git a/packages/app-staking/package.json b/packages/app-staking/package.json index 3d245f484c..7ea3c62d2b 100644 --- a/packages/app-staking/package.json +++ b/packages/app-staking/package.json @@ -12,11 +12,11 @@ "dependencies": { "@babel/runtime": "^7.0.0-beta.51", "@polkadot/app-extrinsics": "^0.19.27", - "@polkadot/storage": "^0.27.9", + "@polkadot/storage": "^0.27.12", "@polkadot/ui-app": "^0.19.27", "@polkadot/ui-keyring": "^0.19.27", "@polkadot/ui-react": "^0.19.27", "@polkadot/ui-react-rx": "^0.19.27", - "@polkadot/util-keyring": "^0.27.9" + "@polkadot/util-keyring": "^0.27.12" } } diff --git a/packages/app-staking/src/Account.tsx b/packages/app-staking/src/Account.tsx index 17f807a7d0..8d1fa6856a 100644 --- a/packages/app-staking/src/Account.tsx +++ b/packages/app-staking/src/Account.tsx @@ -188,12 +188,12 @@ class Account extends React.PureComponent { } private send (extrinsic: SectionItem, values: Array) { - const { accountIndex = new BN(0), address, queueExtrinsic } = this.props; + const { accountIndex, address, queueExtrinsic } = this.props; const publicKey = decodeAddress(address); queueExtrinsic({ extrinsic, - nonce: accountIndex, + nonce: accountIndex || new BN(0), publicKey, values }); diff --git a/packages/ui-app/package.json b/packages/ui-app/package.json index ab7eb9f7fe..76f34cd8f5 100644 --- a/packages/ui-app/package.json +++ b/packages/ui-app/package.json @@ -16,8 +16,8 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/extrinsics": "^0.27.9", - "@polkadot/storage": "^0.27.9", + "@polkadot/extrinsics": "^0.27.12", + "@polkadot/storage": "^0.27.12", "@polkadot/ui-keyring": "^0.19.27", "@polkadot/ui-react": "^0.19.27", "@polkadot/ui-react-rx": "^0.19.27", diff --git a/packages/ui-identicon/package.json b/packages/ui-identicon/package.json index 1f7415f927..615a3fd912 100644 --- a/packages/ui-identicon/package.json +++ b/packages/ui-identicon/package.json @@ -22,7 +22,7 @@ "color": "^3.0.0" }, "devDependencies": { - "@polkadot/util-crypto": "^0.27.9", + "@polkadot/util-crypto": "^0.27.12", "xmlserializer": "^0.6.1" } } diff --git a/packages/ui-keyring/package.json b/packages/ui-keyring/package.json index c1b13546f6..934182114d 100644 --- a/packages/ui-keyring/package.json +++ b/packages/ui-keyring/package.json @@ -17,7 +17,7 @@ "dependencies": { "@babel/runtime": "^7.0.0-beta.51", "@polkadot/ui-react": "^0.19.27", - "@polkadot/util-keyring": "^0.27.9", + "@polkadot/util-keyring": "^0.27.12", "store": "^2.0.12" }, "peerDependencies": { diff --git a/packages/ui-react-rx/package.json b/packages/ui-react-rx/package.json index 4f00c4ca09..b65865e395 100644 --- a/packages/ui-react-rx/package.json +++ b/packages/ui-react-rx/package.json @@ -36,9 +36,9 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/api-rx": "^0.15.6", - "@polkadot/extrinsics": "^0.27.9", - "@polkadot/storage": "^0.27.9", + "@polkadot/api-rx": "^0.15.9", + "@polkadot/extrinsics": "^0.27.12", + "@polkadot/storage": "^0.27.12", "rxjs-compat": "^6.2.2" }, "devDependencies": { diff --git a/packages/ui-react-rx/src/util/isTestChain.ts b/packages/ui-react-rx/src/util/isTestChain.ts index c8a58e83d6..2dd0f879ce 100644 --- a/packages/ui-react-rx/src/util/isTestChain.ts +++ b/packages/ui-react-rx/src/util/isTestChain.ts @@ -7,7 +7,7 @@ import isUndefined from '@polkadot/util/is/undefined'; const re = new RegExp('(dev|loc)', 'i'); export default function isTestChain (chain?: string): boolean { - if (isUndefined(chain) || chain === null) { + if (isUndefined(chain)) { return false; } diff --git a/packages/ui-react-rx/src/util/numberFormat.ts b/packages/ui-react-rx/src/util/numberFormat.ts index 44173b3422..e761828df8 100644 --- a/packages/ui-react-rx/src/util/numberFormat.ts +++ b/packages/ui-react-rx/src/util/numberFormat.ts @@ -6,7 +6,7 @@ import BN from 'bn.js'; const NUMBER_REGEX = new RegExp('(\\d+?)(?=(\\d{3})+(?!\\d)|$)', 'g'); -export default function numberFormat (value?: BN | number): string { +export default function numberFormat (value?: BN | number | null): string { if (value === undefined || value === null) { return '0'; } diff --git a/packages/ui-react-rx/src/util/shouldUseLatestChain.ts b/packages/ui-react-rx/src/util/shouldUseLatestChain.ts index af15aa1b10..376fa5fd01 100644 --- a/packages/ui-react-rx/src/util/shouldUseLatestChain.ts +++ b/packages/ui-react-rx/src/util/shouldUseLatestChain.ts @@ -7,7 +7,7 @@ import isUndefined from '@polkadot/util/is/undefined'; const re = new RegExp('(poc-1)', 'i'); export default function shouldUseLatestChain (chain?: string): boolean { - if (isUndefined(chain) || chain === null) { + if (isUndefined(chain)) { return false; } diff --git a/packages/ui-react/package.json b/packages/ui-react/package.json index e7a71e140c..c8c1e6a8c8 100644 --- a/packages/ui-react/package.json +++ b/packages/ui-react/package.json @@ -17,10 +17,10 @@ "dependencies": { "@babel/runtime": "^7.0.0-beta.51", "@polkadot/ui-identicon": "^0.19.27", - "polkadot-identicon": "^1.0.5" + "polkadot-identicon": "^1.0.2" }, "devDependencies": { - "@polkadot/util-keyring": "^0.27.9", + "@polkadot/util-keyring": "^0.27.12", "babel-loader": "^8.0.0-beta.2", "css-loader": "0.28.9", "empty": "^0.10.1", diff --git a/packages/ui-signer/package.json b/packages/ui-signer/package.json index b0f37bc0c7..d2a26c1f83 100644 --- a/packages/ui-signer/package.json +++ b/packages/ui-signer/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/extrinsics": "^0.27.9", + "@polkadot/extrinsics": "^0.27.12", "@polkadot/ui-app": "^0.19.27", "@polkadot/ui-keyring": "^0.19.27" }, diff --git a/packages/ui-signer/src/Modal.tsx b/packages/ui-signer/src/Modal.tsx index 397529766b..2ce38fac14 100644 --- a/packages/ui-signer/src/Modal.tsx +++ b/packages/ui-signer/src/Modal.tsx @@ -6,8 +6,8 @@ import { ApiProps } from '@polkadot/ui-react-rx/types'; import { I18nProps, BareProps } from '@polkadot/ui-app/types'; import { QueueTx, QueueTx$MessageSetStatus } from './types'; +import BN from 'bn.js'; import React from 'react'; - import Button from '@polkadot/ui-app/Button'; import Modal from '@polkadot/ui-app/Modal'; import classes from '@polkadot/ui-app/util/classes'; diff --git a/packages/ui-signer/src/Queue.tsx b/packages/ui-signer/src/Queue.tsx index c99fb8c185..c51cb17df5 100644 --- a/packages/ui-signer/src/Queue.tsx +++ b/packages/ui-signer/src/Queue.tsx @@ -6,6 +6,7 @@ import { BareProps } from '@polkadot/ui-app/types'; import { ApiProps } from '@polkadot/ui-react-rx/types'; import { QueueProps, QueueTx, QueueTx$Extrinsic, QueueTx$Base, QueueTx$Id, QueueTx$Status } from './types'; +import BN from 'bn.js'; import React from 'react'; import rpcs from '@polkadot/jsonrpc'; import withApi from '@polkadot/ui-react-rx/with/api'; @@ -107,7 +108,7 @@ class Queue extends React.Component { return this.queueAdd({ isValid, - nonce, + nonce: nonce || new BN(0), publicKey, rpc, values: [encoded] diff --git a/yarn.lock b/yarn.lock index ae2d3342a0..4078d6220c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -765,50 +765,50 @@ version "1.1.0" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz#50c1e2260ac0ed9439a181de3725a0168d59c48a" -"@polkadot/api-format@^0.15.6": - version "0.15.6" - resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.15.6.tgz#9d50258df3fcd9e11ad591d43a3f25db3647ff7a" +"@polkadot/api-format@^0.15.9": + version "0.15.9" + resolved "https://registry.yarnpkg.com/@polkadot/api-format/-/api-format-0.15.9.tgz#4433ea678980c4912aa1b96369667044a7f8e882" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/jsonrpc" "^0.27.9" - "@polkadot/primitives" "^0.27.9" - "@polkadot/util" "^0.27.9" - "@polkadot/util-keyring" "^0.27.9" + "@polkadot/jsonrpc" "^0.27.12" + "@polkadot/primitives" "^0.27.12" + "@polkadot/util" "^0.27.12" + "@polkadot/util-keyring" "^0.27.12" -"@polkadot/api-provider@^0.15.6": - version "0.15.6" - resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.15.6.tgz#e3c664687d9d82d59d16e9b5a8e3d10fd285a7a0" +"@polkadot/api-provider@^0.15.9": + version "0.15.9" + resolved "https://registry.yarnpkg.com/@polkadot/api-provider/-/api-provider-0.15.9.tgz#82d2fd835456d247d4dca2d5962493cfe292d73f" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/storage" "^0.27.9" - "@polkadot/util" "^0.27.9" - "@polkadot/util-crypto" "^0.27.9" - "@polkadot/util-keyring" "^0.27.9" + "@polkadot/storage" "^0.27.12" + "@polkadot/util" "^0.27.12" + "@polkadot/util-crypto" "^0.27.12" + "@polkadot/util-keyring" "^0.27.12" "@types/nock" "^9.1.3" eventemitter3 "^2.0.3" isomorphic-fetch "^2.2.1" websocket "^1.0.25" -"@polkadot/api-rx@^0.15.6": - version "0.15.6" - resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.15.6.tgz#849adc73d129d87eaf3c9463f9eb7201b8d6bfa7" +"@polkadot/api-rx@^0.15.9": + version "0.15.9" + resolved "https://registry.yarnpkg.com/@polkadot/api-rx/-/api-rx-0.15.9.tgz#9f3997a837d3635f56823a1b5d3acc68b3c20bfa" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/api" "^0.15.6" - "@polkadot/api-provider" "^0.15.6" + "@polkadot/api" "^0.15.9" + "@polkadot/api-provider" "^0.15.9" "@types/rx" "^4.1.1" rxjs "^6.2.2" -"@polkadot/api@^0.15.6": - version "0.15.6" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.15.6.tgz#6bf02708c5ef77d71ca0b00bdbbf6154abe80f6f" +"@polkadot/api@^0.15.9": + version "0.15.9" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.15.9.tgz#fcf041f612a44c956080c6b3b0dd3f26d9133a6e" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/api-format" "^0.15.6" - "@polkadot/api-provider" "^0.15.6" - "@polkadot/jsonrpc" "^0.27.9" - "@polkadot/params" "^0.27.9" - "@polkadot/util" "^0.27.9" + "@polkadot/api-format" "^0.15.9" + "@polkadot/api-provider" "^0.15.9" + "@polkadot/jsonrpc" "^0.27.12" + "@polkadot/params" "^0.27.12" + "@polkadot/util" "^0.27.12" "@polkadot/dev-react@^0.20.12": version "0.20.12" @@ -877,94 +877,94 @@ typedoc "^0.11.1" typescript "^2.9.2" -"@polkadot/extrinsics@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.27.9.tgz#85e1070fcaa0e8d801b10bb71d19bd6ecfd69520" +"@polkadot/extrinsics@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.27.12.tgz#0fab6c4015f6617da6c9305c22e24e4456b0399e" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.27.9" - "@polkadot/primitives" "^0.27.9" - "@polkadot/util" "^0.27.9" + "@polkadot/params" "^0.27.12" + "@polkadot/primitives" "^0.27.12" + "@polkadot/util" "^0.27.12" -"@polkadot/jsonrpc@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.27.9.tgz#d40a18df93e5a1970bb879c4aa3f35beb9858686" +"@polkadot/jsonrpc@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.27.12.tgz#717f15fe9386cd3660755b936773a29d9c82ceaf" dependencies: - "@polkadot/params" "^0.27.9" + "@polkadot/params" "^0.27.12" babel-runtime "^6.26.0" -"@polkadot/params@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.27.9.tgz#b18dedd1dd6b33539045d9414e966c607fc0bd94" +"@polkadot/params@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.27.12.tgz#446e7a9c23ebaf13da9ccd4d78bcaac287426ff0" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics" "^0.27.9" - "@polkadot/primitives" "^0.27.9" - "@polkadot/util" "^0.27.9" + "@polkadot/extrinsics" "^0.27.12" + "@polkadot/primitives" "^0.27.12" + "@polkadot/util" "^0.27.12" -"@polkadot/primitives@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.27.9.tgz#74006cce2b1198f2b7a56285aecb2582decbff58" +"@polkadot/primitives@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.27.12.tgz#e4dba94c1b05567131b80ebb42a95923dc5e62fd" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/trie-hash" "^0.27.9" - "@polkadot/util" "^0.27.9" + "@polkadot/trie-hash" "^0.27.12" + "@polkadot/util" "^0.27.12" -"@polkadot/storage@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.27.9.tgz#2edb322e81296ebe738af933938fb096b05825a4" +"@polkadot/storage@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.27.12.tgz#2994dc47bf444d93615604e6ab924aeef4723873" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.27.9" - "@polkadot/primitives" "^0.27.9" - "@polkadot/util" "^0.27.9" - "@polkadot/util-crypto" "^0.27.9" - "@polkadot/util-keyring" "^0.27.9" + "@polkadot/params" "^0.27.12" + "@polkadot/primitives" "^0.27.12" + "@polkadot/util" "^0.27.12" + "@polkadot/util-crypto" "^0.27.12" + "@polkadot/util-keyring" "^0.27.12" -"@polkadot/trie-hash@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.27.9.tgz#25aa08e9df39b5ad6ce0507d1deac14b06066660" +"@polkadot/trie-hash@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.27.12.tgz#01f73e2dd4967237a581d2a118b14b754e1b8d03" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.27.9" - "@polkadot/util-crypto" "^0.27.9" - "@polkadot/util-rlp" "^0.27.9" + "@polkadot/util" "^0.27.12" + "@polkadot/util-crypto" "^0.27.12" + "@polkadot/util-rlp" "^0.27.12" "@polkadot/ts@^0.1.10": version "0.1.10" resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.10.tgz#784d460cf4b2e9b38bb1c77f9366dd01425f220d" -"@polkadot/util-crypto@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.27.9.tgz#d01f641a17755ab979c0c16dfb83259cb734f638" +"@polkadot/util-crypto@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.27.12.tgz#a58fc4668d0fef05cae3760bd47ac9bdf042f09c" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.27.9" + "@polkadot/util" "^0.27.12" blakejs "^1.1.0" js-sha3 "^0.7.0" tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-keyring@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.27.9.tgz#9dc109588f87a2d8b0c01165dca8b14316486788" +"@polkadot/util-keyring@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.27.12.tgz#849fcb46987ed733b94c014b65ff4c42772fddd2" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.27.9" - "@polkadot/util-crypto" "^0.27.9" + "@polkadot/util" "^0.27.12" + "@polkadot/util-crypto" "^0.27.12" "@types/bs58" "^3.0.30" bs58 "^4.0.1" -"@polkadot/util-rlp@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.27.9.tgz#596737519b630aeaf0c6b50738d729211b8ee934" +"@polkadot/util-rlp@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.27.12.tgz#6c2d33051a4d54b714872a88bb5ef92754d6b9cd" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.27.9" + "@polkadot/util" "^0.27.12" -"@polkadot/util@^0.27.9": - version "0.27.9" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.27.9.tgz#4c3328aa3d2e51f409d77459005c0d47a9a0341b" +"@polkadot/util@^0.27.12": + version "0.27.12" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.27.12.tgz#fc1155e8099a5fea93d978307531ca48094e8565" dependencies: "@babel/runtime" "^7.0.0-beta.51" "@types/bn.js" "^4.11.1" @@ -8358,7 +8358,7 @@ pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" -polkadot-identicon@^1.0.5: +polkadot-identicon@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/polkadot-identicon/-/polkadot-identicon-1.0.5.tgz#8f8bc255845918a298369380493fef054493b469" dependencies: