Skip to content

Commit

Permalink
fix(modules): Read order with primary preference for consistency afte…
Browse files Browse the repository at this point in the history
…r checkout
  • Loading branch information
leomp12 committed Nov 22, 2024
1 parent 18e47d3 commit 1b9b41a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ const newOrder = async (orderBody: OrderSet) => {
return new Promise<{ order: Orders | null, err?: any }>((resolve) => {
setTimeout(async () => {
try {
const order = (await api.get(`orders/${orderId}`)).data as Orders;
const { data: order } = await api.get(`orders/${orderId}`, {
headers: { 'x-primary-db': 'true' },
});
resolve({ order });
} catch (err: any) {
logger.error(err);
resolve({ order: null, err });
}
}, 800);
}, 400);
});
} catch (err: any) {
if (err.message === 'fetch failed') {
Expand Down

0 comments on commit 1b9b41a

Please # to comment.