Commit 3c1fde4 1 parent 3c59fa2 commit 3c1fde4 Copy full SHA for 3c1fde4
File tree 3 files changed +13
-5
lines changed
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ type PurchaseTransaction @entity {
14
14
fiatAmountPaid : BigInt !
15
15
fiatAmountToPayToSeller : BigInt !
16
16
confirmed : Boolean !
17
- timestampOfConfirmation : BigInt !
17
+ timestampOfConfirmation : BigInt
18
18
}
Original file line number Diff line number Diff line change @@ -166,12 +166,20 @@ export class PurchaseTransaction extends Entity {
166
166
this . set ( "confirmed" , Value . fromBoolean ( value ) ) ;
167
167
}
168
168
169
- get timestampOfConfirmation ( ) : BigInt {
169
+ get timestampOfConfirmation ( ) : BigInt | null {
170
170
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
+ }
172
176
}
173
177
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
+ }
176
184
}
177
185
}
You can’t perform that action at this time.
0 commit comments