Format hash outputs (#107)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user