From 3df8f0ab3a5bc655ab1ab978bef7da3f8eb22b12 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 20 Apr 2018 16:07:07 +0200 Subject: [PATCH 1/6] Revert "[CI Skip] 0.8.15" This reverts commit c1b03eaf2c369625ad100edbeb1361d747ae23db. From fca1c49f7fc559b7b51e6d91f4fa19c4dce17b5c Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 20 Apr 2018 16:07:07 +0200 Subject: [PATCH 2/6] Revert "Calculate hash on pass-through (#70)" This reverts commit 7074036064199a1d3fc36bb2c9b2838de1fcff02. --- package.json | 2 +- packages/api-format/package.json | 3 +-- packages/api-format/src/output.js | 18 ++------------- packages/api-jsonrpc/src/chain/newHead.js | 3 +-- packages/api-jsonrpc/src/types.js | 3 +-- packages/api-provider/package.json | 6 ++--- packages/api/package.json | 2 +- yarn.lock | 28 +++++++++++------------ 8 files changed, 24 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 9fc8836e8f9a..4da474c6a242 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "jest --coverage" }, "devDependencies": { - "@polkadot/dev": "^0.17.9", + "@polkadot/dev": "^0.17.6", "lerna": "^2.5.1" } } diff --git a/packages/api-format/package.json b/packages/api-format/package.json index d13d51134f16..f19be3967c9a 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -34,8 +34,7 @@ }, "dependencies": { "@polkadot/primitives-json": "^0.10.1", - "@polkadot/util": "^0.19.1", - "@polkadot/util-crypto": "^0.19.1", + "@polkadot/util": "^0.18.6", "babel-runtime": "^6.26.0" } } diff --git a/packages/api-format/src/output.js b/packages/api-format/src/output.js index db3d7dbe2814..35b443fa5e8b 100644 --- a/packages/api-format/src/output.js +++ b/packages/api-format/src/output.js @@ -10,7 +10,6 @@ const bytesDecode = require('@polkadot/primitives-json/bytes/decode'); const headerDecode = require('@polkadot/primitives-json/header/decode'); const isNull = require('@polkadot/util/is/null'); const isUndefined = require('@polkadot/util/is/undefined'); -const blake2Asu8a256 = require('@polkadot/util-crypto/blake2/asU8a256'); const format = require('./format'); @@ -21,23 +20,10 @@ const formatters = { 'U64': bnDecode }; -module.exports = function formatOutput ({ type, withHash }: InterfaceOutputType, value?: mixed): ?mixed { +module.exports = function formatOutput (output: InterfaceOutputType, value?: mixed): ?mixed { if (isUndefined(value) || isNull(value)) { return value; } - const decoded = format(formatters, [type], [value])[0]; - - // flowlint-next-line sketchy-null-bool:off - if (!withHash) { - return decoded; - } - - // flowlint-next-line unclear-type:off - const hash = blake2Asu8a256(((value: any): Uint8Array)); - - return { - [type.toLowerCase()]: decoded, - hash - }; + return format(formatters, [output.type], [value])[0]; }; diff --git a/packages/api-jsonrpc/src/chain/newHead.js b/packages/api-jsonrpc/src/chain/newHead.js index f3fbaf67ab57..36125669063e 100644 --- a/packages/api-jsonrpc/src/chain/newHead.js +++ b/packages/api-jsonrpc/src/chain/newHead.js @@ -16,7 +16,6 @@ module.exports = ({ isSubscription: true, inputs: [], output: { - type: 'Header', - withHash: true + type: 'Header' } }: InterfaceMethodDefinition); diff --git a/packages/api-jsonrpc/src/types.js b/packages/api-jsonrpc/src/types.js index 726031b4a5b0..ae057f79033f 100644 --- a/packages/api-jsonrpc/src/types.js +++ b/packages/api-jsonrpc/src/types.js @@ -16,8 +16,7 @@ export type InterfaceInputType = { }; export type InterfaceOutputType = { - type: FormatOutputType, - withHash?: boolean + type: FormatOutputType }; export type InterfaceMethodDefinition$Subscribe = { diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index 9c5da29919da..de93375ecf7d 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -34,9 +34,9 @@ "nock": "^9.1.0" }, "dependencies": { - "@polkadot/util": "^0.19.1", - "@polkadot/util-crypto": "^0.19.1", - "@polkadot/util-keyring": "^0.19.1", + "@polkadot/util": "^0.18.6", + "@polkadot/util-crypto": "^0.18.6", + "@polkadot/util-keyring": "^0.18.6", "babel-runtime": "^6.26.0", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.25" diff --git a/packages/api/package.json b/packages/api/package.json index fa6655fae6f8..6b86e1ec1a64 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -33,7 +33,7 @@ "@polkadot/api-format": "^0.8.14", "@polkadot/api-jsonrpc": "^0.8.14", "@polkadot/api-provider": "^0.8.14", - "@polkadot/util": "^0.19.1", + "@polkadot/util": "^0.18.6", "babel-runtime": "^6.26.0" } } diff --git a/yarn.lock b/yarn.lock index d32e864529b4..31f77d22af92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -79,9 +79,9 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@polkadot/dev@^0.17.9": - version "0.17.9" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.17.9.tgz#12316416384eb3da5e926f2e875902a3c8e4e5a3" +"@polkadot/dev@^0.17.6": + version "0.17.6" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.17.6.tgz#8935c83ee71d32bf343e83fe537deb20b5764be0" dependencies: babel-cli "^6.26.0" babel-core "^6.26.0" @@ -176,9 +176,9 @@ tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-crypto@^0.19.1": - version "0.19.1" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.19.1.tgz#95927de2f8a4384f05b872132e00bfd34aa1ea77" +"@polkadot/util-crypto@^0.18.6": + version "0.18.6" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.18.6.tgz#57735d2056d178a3e741ca402ea1ae43267d81f8" dependencies: babel-runtime "^6.26.0" blakejs "^1.1.0" @@ -194,12 +194,12 @@ "@polkadot/util-crypto" "^0.18.4" babel-runtime "^6.26.0" -"@polkadot/util-keyring@^0.19.1": - version "0.19.1" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.19.1.tgz#dbf6e9efbe1dd4de982367c279b3193584db414f" +"@polkadot/util-keyring@^0.18.6": + version "0.18.6" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.18.6.tgz#983b58ac371a5866adcc0469d8c03a24a7a77f06" dependencies: - "@polkadot/util" "^0.19.1" - "@polkadot/util-crypto" "^0.19.1" + "@polkadot/util" "^0.18.6" + "@polkadot/util-crypto" "^0.18.6" babel-runtime "^6.26.0" "@polkadot/util-rlp@^0.18.4": @@ -227,9 +227,9 @@ deasync "^0.1.12" ip-regex "^2.1.0" -"@polkadot/util@^0.19.1": - version "0.19.1" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.19.1.tgz#e19dc51b3d998b489ed26738a3a1e0cded65c020" +"@polkadot/util@^0.18.6": + version "0.18.6" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.18.6.tgz#dd3ea07d67d31de02a154dd54665ce9779a73211" dependencies: babel-runtime "^6.26.0" bn.js "^4.11.8" From ef58ec66d15c917c23eb0ccb0ce42f68b734f678 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 20 Apr 2018 16:12:49 +0200 Subject: [PATCH 3/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b4fe14fea5f1..e59cf83e5279 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "jest --coverage" }, "devDependencies": { - "@polkadot/dev": "^0.17.6", + "@polkadot/dev": "^0.17.9", "lerna": "^2.5.1" } } From a8d2a1487dfab0259371a1c26aafb65a4280bf4f Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 20 Apr 2018 16:13:14 +0200 Subject: [PATCH 4/6] Update package.json --- packages/api-format/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api-format/package.json b/packages/api-format/package.json index c176acb5709b..84a00677710a 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "@polkadot/primitives-json": "^0.10.1", - "@polkadot/util": "^0.18.6", + "@polkadot/util": "^0.19.1", "babel-runtime": "^6.26.0" } } From 23a68cb0ffbf656e08825124ef5ef11963570087 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 20 Apr 2018 16:13:39 +0200 Subject: [PATCH 5/6] Update package.json --- packages/api-provider/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index d56ed85edee2..b460e33a5293 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -34,9 +34,9 @@ "nock": "^9.1.0" }, "dependencies": { - "@polkadot/util": "^0.18.6", - "@polkadot/util-crypto": "^0.18.6", - "@polkadot/util-keyring": "^0.18.6", + "@polkadot/util": "^0.19.1", + "@polkadot/util-crypto": "^0.19.1", + "@polkadot/util-keyring": "^0.19.1", "babel-runtime": "^6.26.0", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.25" From c57e1a026d8f2a88f870a91d0c09b5c7d9d5f43c Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 20 Apr 2018 16:14:38 +0200 Subject: [PATCH 6/6] yarn --- yarn.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 31f77d22af92..d32e864529b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -79,9 +79,9 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@polkadot/dev@^0.17.6": - version "0.17.6" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.17.6.tgz#8935c83ee71d32bf343e83fe537deb20b5764be0" +"@polkadot/dev@^0.17.9": + version "0.17.9" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.17.9.tgz#12316416384eb3da5e926f2e875902a3c8e4e5a3" dependencies: babel-cli "^6.26.0" babel-core "^6.26.0" @@ -176,9 +176,9 @@ tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-crypto@^0.18.6": - version "0.18.6" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.18.6.tgz#57735d2056d178a3e741ca402ea1ae43267d81f8" +"@polkadot/util-crypto@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.19.1.tgz#95927de2f8a4384f05b872132e00bfd34aa1ea77" dependencies: babel-runtime "^6.26.0" blakejs "^1.1.0" @@ -194,12 +194,12 @@ "@polkadot/util-crypto" "^0.18.4" babel-runtime "^6.26.0" -"@polkadot/util-keyring@^0.18.6": - version "0.18.6" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.18.6.tgz#983b58ac371a5866adcc0469d8c03a24a7a77f06" +"@polkadot/util-keyring@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.19.1.tgz#dbf6e9efbe1dd4de982367c279b3193584db414f" dependencies: - "@polkadot/util" "^0.18.6" - "@polkadot/util-crypto" "^0.18.6" + "@polkadot/util" "^0.19.1" + "@polkadot/util-crypto" "^0.19.1" babel-runtime "^6.26.0" "@polkadot/util-rlp@^0.18.4": @@ -227,9 +227,9 @@ deasync "^0.1.12" ip-regex "^2.1.0" -"@polkadot/util@^0.18.6": - version "0.18.6" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.18.6.tgz#dd3ea07d67d31de02a154dd54665ce9779a73211" +"@polkadot/util@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.19.1.tgz#e19dc51b3d998b489ed26738a3a1e0cded65c020" dependencies: babel-runtime "^6.26.0" bn.js "^4.11.8"