Skip to content

Commit 3c1fde4

Browse files
committed
Build changes for making timestamp not non-null
1 parent 3c59fa2 commit 3c1fde4

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

graph/build/CazzPay/CazzPay.wasm

29 Bytes
Binary file not shown.

graph/build/schema.graphql

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ type PurchaseTransaction @entity {
1414
fiatAmountPaid: BigInt!
1515
fiatAmountToPayToSeller: BigInt!
1616
confirmed: Boolean!
17-
timestampOfConfirmation: BigInt!
17+
timestampOfConfirmation: BigInt
1818
}

graph/generated/schema.ts

+12-4
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,20 @@ export class PurchaseTransaction extends Entity {
166166
this.set("confirmed", Value.fromBoolean(value));
167167
}
168168

169-
get timestampOfConfirmation(): BigInt {
169+
get timestampOfConfirmation(): BigInt | null {
170170
let value = this.get("timestampOfConfirmation");
171-
return value!.toBigInt();
171+
if (!value || value.kind == ValueKind.NULL) {
172+
return null;
173+
} else {
174+
return value.toBigInt();
175+
}
172176
}
173177

174-
set timestampOfConfirmation(value: BigInt) {
175-
this.set("timestampOfConfirmation", Value.fromBigInt(value));
178+
set timestampOfConfirmation(value: BigInt | null) {
179+
if (!value) {
180+
this.unset("timestampOfConfirmation");
181+
} else {
182+
this.set("timestampOfConfirmation", Value.fromBigInt(<BigInt>value));
183+
}
176184
}
177185
}

0 commit comments

Comments
 (0)