Skip to content

Commit cb28e90

Browse files
authored
Merge pull request #330 from hypercerts-org/develop
Develop
2 parents 07c0be4 + 3455209 commit cb28e90

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/services/database/entities/MarketplaceOrdersEntityService.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff 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")

0 commit comments

Comments
 (0)