Skip to content

Commit

Permalink
Merge pull request #1275 from o1-labs/fix/struct-empty
Browse files Browse the repository at this point in the history
Fix struct after recent generic type changes
  • Loading branch information
mitschabaude authored Nov 29, 2023
2 parents f5db874 + e30f64e commit 6995e3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/lib/circuit_value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ function Struct<
};
toJSON: (x: T) => J;
fromJSON: (x: J) => T;
empty: () => T;
} {
class Struct_ {
static type = provable<A>(type);
Expand Down
4 changes: 0 additions & 4 deletions src/lib/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6995e3b

Please sign in to comment.