Skip to content

Commit

Permalink
fix waypoint id
Browse files Browse the repository at this point in the history
  • Loading branch information
doljko committed Feb 23, 2024
1 parent 8908a84 commit 49254b0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/features/Shared/OrderScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO;
const isObjectEmpty = obj => isEmpty(obj) || Object.values(obj).length === 0;

const getOrderCurrency = order => {
console.log('order_', JSON.stringify(order));
let currency = order.getAttribute('meta.currency');

// check order for currency attribute too
if (!currency) {
currency = order.getAttribute('currency');
Expand All @@ -44,7 +42,6 @@ const getOrderCurrency = order => {
currency = entities[0].currency;
}
}

return currency ?? 'USD';
};

Expand Down Expand Up @@ -126,7 +123,7 @@ const OrderScreen = ({ navigation, route }) => {
for (let index = 0; index < waypoints.length; index++) {
const waypoint = waypoints[index];

if (!waypoint?.tracking_number || statusesToSkip.includes(waypoint.tracking_number.status_code?.toLowerCase())) {
if (!waypoint?.tracking || statusesToSkip.includes(waypoint.tracking?.toLowerCase())) {
continue;
}

Expand Down

0 comments on commit 49254b0

Please sign in to comment.