Update Substrate static metadata (#3576)

This commit is contained in:
Jaco
2021-05-27 17:13:57 +02:00
committed by GitHub
parent 389dbb58a9
commit 8cb15c6a87
4 changed files with 68 additions and 14 deletions
+1 -3
View File
@@ -121,9 +121,7 @@ export class Data extends Enum {
} else if (this.index === 1) {
// don't add the length, just the data
const data = this.value.toU8a(true);
const length = data.length >= 32
? 32
: data.length;
const length = Math.min(data.length, 32);
const u8a = new Uint8Array(length + 1);
u8a.set([length + 1], 0);