Raw/Bytes toHuman() uses utf8 as available (#2431)
* Raw/Bytes toHuman() uses utf8 as available * Rewrite yarn.lock * Bump babel
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/metadata": "1.25.0-beta.5",
|
||||
"@polkadot/util": "^2.18.1",
|
||||
"@polkadot/util-crypto": "^2.18.1",
|
||||
|
||||
@@ -117,7 +117,9 @@ export default class Raw extends Uint8Array implements IU8a {
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (): AnyJson {
|
||||
return this.toJSON();
|
||||
return this.isUtf8
|
||||
? this.toUtf8()
|
||||
: this.toJSON();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user