Format hash outputs (#107)

This commit is contained in:
Jaco Greeff
2018-06-28 13:21:59 +02:00
committed by GitHub
parent 264c30449d
commit ec49c40599
5 changed files with 64 additions and 62 deletions
+4 -4
View File
@@ -35,9 +35,9 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.51",
"@polkadot/jsonrpc": "^0.26.8",
"@polkadot/primitives": "^0.26.8",
"@polkadot/util": "^0.26.8",
"@polkadot/util-keyring": "^0.26.8"
"@polkadot/jsonrpc": "^0.26.9",
"@polkadot/primitives": "^0.26.9",
"@polkadot/util": "^0.26.9",
"@polkadot/util-keyring": "^0.26.9"
}
}
+2
View File
@@ -8,6 +8,7 @@ import { FormatterFunction } from './types';
import addressEncode from '@polkadot/util-keyring/address/encode';
import bnDecode from '@polkadot/primitives/json/bn/decode';
import bytesDecode from '@polkadot/primitives/json/bytes/decode';
import hashDecode from '@polkadot/primitives/json/hash/decode';
import headerDecode from '@polkadot/primitives/json/header/decode';
import isNull from '@polkadot/util/is/null';
import isUndefined from '@polkadot/util/is/undefined';
@@ -19,6 +20,7 @@ const formatters = new Map<Param$Types, FormatterFunction>([
['AccountId', addressEncode],
['BlockNumber', bnDecode],
['Bytes', bytesDecode],
['Hash', hashDecode],
['Header', headerDecode],
['u64', bnDecode]
]);