Skip to content

Commit

Permalink
Update jsonrpc
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed May 18, 2018
1 parent cc32982 commit fe0090c
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 63 deletions.
4 changes: 2 additions & 2 deletions packages/api-format/package.json
Expand Up @@ -31,8 +31,8 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/jsonrpc": "^0.15.2",
"@polkadot/primitives-json": "^0.15.2",
"@polkadot/jsonrpc": "^0.15.3",
"@polkadot/primitives-json": "^0.15.3",
"@polkadot/util": "^0.21.1"
}
}
11 changes: 5 additions & 6 deletions packages/api-format/src/format.js
Expand Up @@ -3,11 +3,11 @@
// of the ISC license. See the LICENSE file for details.
// @flow

import type { Param$Type, Param$Type$Tuple, Param$Types } from '@polkadot/params/types';
import type { Param$Types, Param$Type$Array } from '@polkadot/params/types';
import type { FormatterFunction } from './types';

type FormattersFunctionMap = $Shape<{
[Param$Type]: FormatterFunction
[Param$Types]: FormatterFunction
}>;

const typeToString = require('@polkadot/params/typeToString');
Expand All @@ -17,11 +17,11 @@ const l = require('@polkadot/util/logger')('api-format');
const echo = require('./echo');

// flowlint-next-line unclear-type:off
function formatSingleType (formatters: FormattersFunctionMap, type: Param$Type, value: any): any {
function formatSingleType (formatters: FormattersFunctionMap, type: Param$Types, value: any): any {
const formatter: FormatterFunction = formatters[type];

if (isUndefined(formatter)) {
l.warn(`Unable to find default formatter for '${type}', falling back to echo`);
l.warn(`Unable to find default formatter for '${typeToString(type)}', falling back to echo`);

return echo(value);
}
Expand All @@ -34,7 +34,7 @@ function formatSingleType (formatters: FormattersFunctionMap, type: Param$Type,
}

// flowlint-next-line unclear-type:off
function formatArrayType (formatters: FormattersFunctionMap, [ type ]: Param$Type$Tuple, value: Array<any>): any {
function formatArrayType (formatters: FormattersFunctionMap, [ type ]: Param$Type$Array, value: Array<any>): any {
return value.map((value) => {
return formatSingleType(formatters, type, value);
});
Expand All @@ -47,7 +47,6 @@ module.exports = function format (formatters: FormattersFunctionMap, types: Arra

if (Array.isArray(type)) {
// FIXME we are currently not catering for tuples
// $FlowFixMe assume that we are only passing a single type through
return formatArrayType(formatters, type, value);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/api-provider/package.json
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/storage-substrate": "^0.15.2",
"@polkadot/storage-substrate": "^0.15.3",
"@polkadot/util": "^0.21.1",
"@polkadot/util-crypto": "^0.21.1",
"@polkadot/util-keyring": "^0.21.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package.json
Expand Up @@ -33,8 +33,8 @@
"@babel/runtime": "^7.0.0-beta.47",
"@polkadot/api-format": "^0.12.1",
"@polkadot/api-provider": "^0.12.1",
"@polkadot/jsonrpc": "^0.15.2",
"@polkadot/params": "^0.15.2",
"@polkadot/jsonrpc": "^0.15.3",
"@polkadot/params": "^0.15.3",
"@polkadot/util": "^0.21.1"
}
}
104 changes: 52 additions & 52 deletions yarn.lock
Expand Up @@ -700,102 +700,102 @@
mkdirp "^0.5.1"
rimraf "^2.6.2"

"@polkadot/extrinsics-substrate@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-substrate/-/extrinsics-substrate-0.15.2.tgz#eceb2928c4682d21ec5288200f79c75a13b08772"
"@polkadot/extrinsics-substrate@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-substrate/-/extrinsics-substrate-0.15.3.tgz#2258f923b9c799be374375bbb57e70139baaf52f"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/extrinsics" "^0.15.2"
"@polkadot/extrinsics" "^0.15.3"

"@polkadot/extrinsics@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.15.2.tgz#4ac10e6f40059e90e5ee01a0bab3c520e7e69c57"
"@polkadot/extrinsics@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.15.3.tgz#4af6b339aa1dd59c1795562f2542dfdcf9265dc0"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/params" "^0.15.2"
"@polkadot/primitives" "^0.15.2"
"@polkadot/params" "^0.15.3"
"@polkadot/primitives" "^0.15.3"
"@polkadot/util" "^0.21.1"

"@polkadot/jsonrpc@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.15.2.tgz#8237038b7af25e3212008276c92620928001ea5f"
"@polkadot/jsonrpc@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.15.3.tgz#94ad8c39fc9b01449c9e4adf0028a152f65c17d9"
dependencies:
"@polkadot/params" "^0.15.2"
"@polkadot/params" "^0.15.3"
babel-runtime "^6.26.0"

"@polkadot/params@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.15.2.tgz#f196ec68454b4856a2602f9cd53c00e695ccd7ff"
"@polkadot/params@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.15.3.tgz#1ce662b9823ac0a29366d5c0bd16f7064a694e02"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/extrinsics" "^0.15.2"
"@polkadot/extrinsics-substrate" "^0.15.2"
"@polkadot/primitives" "^0.15.2"
"@polkadot/extrinsics" "^0.15.3"
"@polkadot/extrinsics-substrate" "^0.15.3"
"@polkadot/primitives" "^0.15.3"
"@polkadot/util" "^0.21.1"

"@polkadot/primitives-builder@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.15.2.tgz#b9d839a8fab631c598408af3a10c83be04f8b47f"
"@polkadot/primitives-builder@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.15.3.tgz#a3d1ff95920585c392e1103bea832ce7fb5d0249"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.2"
"@polkadot/primitives-codec" "^0.15.2"
"@polkadot/primitives" "^0.15.3"
"@polkadot/primitives-codec" "^0.15.3"
"@polkadot/util" "^0.21.1"
"@polkadot/util-crypto" "^0.21.1"
"@polkadot/util-triehash" "^0.21.1"

"@polkadot/primitives-codec@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.15.2.tgz#41c7b5982be53995b56a5f11e56ab67e00f2ab99"
"@polkadot/primitives-codec@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.15.3.tgz#309eb1767423e36ea07d04481a60fb6e199811a5"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.2"
"@polkadot/primitives-builder" "^0.15.2"
"@polkadot/primitives-rlp" "^0.15.2"
"@polkadot/primitives" "^0.15.3"
"@polkadot/primitives-builder" "^0.15.3"
"@polkadot/primitives-rlp" "^0.15.3"
"@polkadot/util" "^0.21.1"
"@polkadot/util-keyring" "^0.21.1"

"@polkadot/primitives-json@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.15.2.tgz#242f417a0656d53edd8c3bb96769491bebb9f8dd"
"@polkadot/primitives-json@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.15.3.tgz#2d238269ea29f10ddbeee6f0edfc6fccd61bb56f"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.2"
"@polkadot/primitives-builder" "^0.15.2"
"@polkadot/primitives" "^0.15.3"
"@polkadot/primitives-builder" "^0.15.3"
"@polkadot/util" "^0.21.1"

"@polkadot/primitives-rlp@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-rlp/-/primitives-rlp-0.15.2.tgz#461dcbadad3c1ed5931f4fe9805f01c1ef58cdc0"
"@polkadot/primitives-rlp@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/primitives-rlp/-/primitives-rlp-0.15.3.tgz#7377ca033ada2f43ecbca52ff9ac29fec124447d"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/primitives" "^0.15.2"
"@polkadot/primitives-builder" "^0.15.2"
"@polkadot/primitives" "^0.15.3"
"@polkadot/primitives-builder" "^0.15.3"
"@polkadot/util" "^0.21.1"
"@polkadot/util-crypto" "^0.21.1"

"@polkadot/primitives@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.15.2.tgz#60c97223286de22fdbda089718fb0dd98d0d96cc"
"@polkadot/primitives@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.15.3.tgz#8b7405db42bf45a88d40c92dcd830bf269bb4029"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/util" "^0.21.1"

"@polkadot/storage-substrate@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/storage-substrate/-/storage-substrate-0.15.2.tgz#a2966f51d1c939609832864a4bd73cd1f69db675"
"@polkadot/storage-substrate@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/storage-substrate/-/storage-substrate-0.15.3.tgz#950335d0b719ca9f5100ec1760a313d1461ac1b5"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/storage" "^0.15.2"
"@polkadot/storage" "^0.15.3"
"@polkadot/util" "^0.21.1"

"@polkadot/storage@^0.15.2":
version "0.15.2"
resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.15.2.tgz#2ac60d398a3a61a515e9d62f92e5166c72c9666f"
"@polkadot/storage@^0.15.3":
version "0.15.3"
resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.15.3.tgz#3c2981ef3085d8fbcb37877e82019101766bad68"
dependencies:
"@babel/runtime" "^7.0.0-beta.47"
"@polkadot/params" "^0.15.2"
"@polkadot/primitives" "^0.15.2"
"@polkadot/params" "^0.15.3"
"@polkadot/primitives" "^0.15.3"
"@polkadot/util" "^0.21.1"

"@polkadot/util-crypto@^0.21.1":
Expand Down

0 comments on commit fe0090c

Please sign in to comment.