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/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/api": "1.25.0-beta.5",
|
||||
"@polkadot/rpc-core": "1.25.0-beta.5",
|
||||
"@polkadot/types": "1.25.0-beta.5",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/api": "1.25.0-beta.5",
|
||||
"@polkadot/rpc-core": "1.25.0-beta.5",
|
||||
"@polkadot/rpc-provider": "1.25.0-beta.5",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/api-derive": "1.25.0-beta.5",
|
||||
"@polkadot/keyring": "^2.18.1",
|
||||
"@polkadot/metadata": "1.25.0-beta.5",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/types": "1.25.0-beta.5",
|
||||
"@polkadot/types-known": "1.25.0-beta.5",
|
||||
"@polkadot/util": "^2.18.1",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/metadata": "1.25.0-beta.5",
|
||||
"@polkadot/rpc-provider": "1.25.0-beta.5",
|
||||
"@polkadot/types": "1.25.0-beta.5",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/metadata": "1.25.0-beta.5",
|
||||
"@polkadot/types": "1.25.0-beta.5",
|
||||
"@polkadot/util": "^2.18.1",
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.10.4",
|
||||
"@babel/register": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/register": "^7.10.5",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/api": "1.25.0-beta.5",
|
||||
"@polkadot/metadata": "1.25.0-beta.5",
|
||||
"@polkadot/rpc-provider": "1.25.0-beta.5",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.4",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@polkadot/types": "1.25.0-beta.5",
|
||||
"@polkadot/util": "^2.18.1",
|
||||
"bn.js": "^5.1.2"
|
||||
|
||||
@@ -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