File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/services/database/entities Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -139,11 +139,17 @@ export class MarketplaceOrdersService {
139139 . where ( "chain_id" , "=" , nonce . chain_id )
140140 . executeTakeFirst ( )
141141 // TODO: Investigate why chain_id and nonce_counter are returned as strings
142- . then ( ( res ) => ( {
143- ...res ,
144- chain_id : Number ( res ?. chain_id ) ,
145- nonce_counter : Number ( res ?. nonce_counter ) ,
146- } ) )
142+ . then ( ( res ) => {
143+ if ( ! res ) {
144+ return undefined ;
145+ }
146+
147+ return {
148+ ...res ,
149+ chain_id : Number ( res ?. chain_id ) ,
150+ nonce_counter : Number ( res ?. nonce_counter ) ,
151+ } ;
152+ } )
147153 ) ;
148154 }
149155
@@ -159,6 +165,8 @@ export class MarketplaceOrdersService {
159165 throw new Error ( "Address and chain ID are required" ) ;
160166 }
161167
168+ console . log ( "nonce" , nonce ) ;
169+
162170 return this . dbService
163171 . getConnection ( )
164172 . updateTable ( "marketplace_order_nonces" )
You can’t perform that action at this time.
0 commit comments