@whatmore-repo/whatmore-reactnative-sdk 1.0.36 → 1.0.37

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.36",
3
+ "version": "1.0.37",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "main": "index.js",
@@ -1,5 +1,6 @@
1
1
 
2
2
  import getSymbolFromCurrency from 'currency-symbol-map'
3
+ import { getGlobalState } from '../globals/useAppState_APP';
3
4
 
4
5
  function priceWithCommas(price){
5
6
  return price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@ -23,6 +24,8 @@ export function getPriceStringWithCurrency(price, spaceString = "", currencyCode
23
24
  if(!price || typeof price == undefined){
24
25
  return "";
25
26
  }
27
+ const whatmoreShopId = getGlobalState('whatmoreShopId')
28
+ const finalCurrency = whatmoreShopId == "68234805419" ? "QAR": getSymbolFromCurrency(currencyCode ?? "INR")
26
29
 
27
- return getSymbolFromCurrency(currencyCode ?? "INR") + spaceString + priceWithCommas(roundedPrice(price));
30
+ return finalCurrency + spaceString + priceWithCommas(roundedPrice(price));
28
31
  }