File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ export class SubtopiaClient {
344344 maxSubs : BigInt ( globalState . max_subscribers ) ,
345345 coinID : BigInt ( globalState . coin_id ) ,
346346 productType : globalState . product_type ,
347- lifecycle : BigInt ( globalState . lifecycle ) ,
347+ lifecycle : globalState . lifecycle ,
348348 createdAt : BigInt ( globalState . created_at ) ,
349349 duration : globalState . duration ,
350350 oracleID : BigInt ( globalState . oracle_id ) ,
Original file line number Diff line number Diff line change 88 ChainType ,
99 DiscountType ,
1010 Duration ,
11+ LifecycleState ,
1112 LockerType ,
1213 ProductType ,
1314} from "../types/enums" ;
@@ -92,7 +93,7 @@ interface ProductGlobalState {
9293 coinID : bigint ;
9394 productType : ProductType ;
9495 duration : Duration ;
95- lifecycle : bigint ;
96+ lifecycle : LifecycleState ;
9697 createdAt : bigint ;
9798 oracleID : bigint ;
9899 unitName : string ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ interface ProductGlobalState {
2222 coinID : bigint ;
2323 productType : ProductType ;
2424 duration : Duration ;
25- lifecycle : bigint ;
25+ lifecycle : LifecycleState ;
2626 createdAt : bigint ;
2727 oracleID : bigint ;
2828 unitName : string ;
Original file line number Diff line number Diff line change @@ -435,6 +435,15 @@ export function parseTokenProductGlobalState(input: AppState) {
435435 // @ts -ignore
436436 input [ key ] . valueRaw ,
437437 ) ;
438+ } else if ( keyMap [ key ] === "duration" ) {
439+ // Convert duration from bigint to number to match Duration enum type
440+ output [ keyMap [ key ] ] = Number ( input [ key ] . value ) ;
441+ } else if ( keyMap [ key ] === "product_type" ) {
442+ // Convert product_type from bigint to number to match ProductType enum type
443+ output [ keyMap [ key ] ] = Number ( input [ key ] . value ) ;
444+ } else if ( keyMap [ key ] === "lifecycle" ) {
445+ // Convert lifecycle from bigint to number to match LifecycleState enum type
446+ output [ keyMap [ key ] ] = Number ( input [ key ] . value ) ;
438447 } else {
439448 output [ keyMap [ key ] ] = input [ key ] . value ;
440449 }
You can’t perform that action at this time.
0 commit comments