@whatmore-repo/whatmore-reactnative-sdk 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatmore-repo/whatmore-reactnative-sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "main": "index.js",
@@ -28,7 +28,7 @@ export default function ProductPriceBadge(props) {
28
28
  color: color
29
29
  }}
30
30
  >
31
- {getPriceStringWithCurrency(product.price)}
31
+ {getPriceStringWithCurrency(product.price, "",product.currency ?? "INR")}
32
32
  </Text>
33
33
  <Text
34
34
  numberOfLines={1}
@@ -43,7 +43,7 @@ export default function ProductPriceBadge(props) {
43
43
  fontSize: fontSize
44
44
  }}
45
45
  >
46
- {getPriceStringWithCurrency(product.compare_price)}
46
+ {getPriceStringWithCurrency(product.compare_price, "", product.currency ?? "INR")}
47
47
  </Text>
48
48
 
49
49
  </View>
@@ -31,7 +31,7 @@ export default function ProductTileV1(props) {
31
31
  props.onAction({
32
32
  action: "OPEN_PRODUCT",
33
33
  params:{
34
- productId: 'gid://shopify/Product/7600010723466'
34
+ productId: 'gid://shopify/Product/' + product.client_product_id
35
35
  }
36
36
  })
37
37
  }
@@ -13,7 +13,7 @@ function roundedPrice(price){
13
13
  if(priceAsString.split('.')[0].length >= 4){
14
14
  return parseInt(price);
15
15
  }
16
- return price.toFixed(2);
16
+ return parseFloat(price)?.toFixed(2);
17
17
  }
18
18
 
19
19
  return parseInt(price);