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
+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]
]);