From 5945866597b93e0638ab2bf1a9bed0ea023db423 Mon Sep 17 00:00:00 2001 From: Gregor Date: Tue, 28 Nov 2023 10:36:24 +0100 Subject: [PATCH 1/2] fix: struct returns empty --- src/lib/circuit_value.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/circuit_value.ts b/src/lib/circuit_value.ts index d0a85e5cc9..679b78efda 100644 --- a/src/lib/circuit_value.ts +++ b/src/lib/circuit_value.ts @@ -384,6 +384,7 @@ function Struct< }; toJSON: (x: T) => J; fromJSON: (x: J) => T; + empty: () => T; } { class Struct_ { static type = provable(type); From e30f64e5fa081e95e234ae9bcb5eb58ba90f45a5 Mon Sep 17 00:00:00 2001 From: Gregor Date: Tue, 28 Nov 2023 21:56:59 +0100 Subject: [PATCH 2/2] fixup --- src/lib/hash.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/hash.ts b/src/lib/hash.ts index c6d66d3f9d..2b1064f7a7 100644 --- a/src/lib/hash.ts +++ b/src/lib/hash.ts @@ -184,10 +184,6 @@ const TokenSymbolPure: ProvableExtended< }, }; class TokenSymbol extends Struct(TokenSymbolPure) { - static get empty() { - return { symbol: '', field: Field(0) }; - } - static from(symbol: string): TokenSymbol { let bytesLength = new TextEncoder().encode(symbol).length; if (bytesLength > 6)