monkey-front-components 0.0.358 → 0.0.361
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/esm2020/lib/components/shared/products/providers/products.model.mjs +18 -19
- package/fesm2015/monkey-front-components.mjs +17 -18
- package/fesm2015/monkey-front-components.mjs.map +1 -1
- package/fesm2020/monkey-front-components.mjs +17 -18
- package/fesm2020/monkey-front-components.mjs.map +1 -1
- package/monkey-front-components-0.0.361.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-components-0.0.358.tgz +0 -0
|
@@ -2623,26 +2623,25 @@ class ProductsModel {
|
|
|
2623
2623
|
const { product, token, url } = this;
|
|
2624
2624
|
if (!url)
|
|
2625
2625
|
return;
|
|
2626
|
-
const contries = {
|
|
2627
|
-
'.monkey.exchange': 'br',
|
|
2628
|
-
'.monkeyecx.com': 'br',
|
|
2629
|
-
'.sales.finance': 'br',
|
|
2630
|
-
'.monkeyexchange.cl': 'cl'
|
|
2631
|
-
};
|
|
2632
|
-
const domain = url.substring(url.indexOf('.', -1), url.length);
|
|
2633
|
-
const country = contries[domain];
|
|
2634
2626
|
const sufix = {
|
|
2635
|
-
|
|
2636
|
-
|
|
2627
|
+
SALES_FINANCE: 'SF_',
|
|
2628
|
+
SPIKE: 'SF_',
|
|
2629
|
+
SUPPLY_CHAIN: 'SF_'
|
|
2637
2630
|
}[product];
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2631
|
+
const { hostname } = new URL(url);
|
|
2632
|
+
const lastDot = hostname?.lastIndexOf('.');
|
|
2633
|
+
const previousLastDot = hostname?.lastIndexOf('.', lastDot - 1);
|
|
2634
|
+
const domain = hostname?.substring(previousLastDot + 1, hostname?.length);
|
|
2635
|
+
const handledToken = token?.replace(sufix, '');
|
|
2636
|
+
const path = {
|
|
2637
|
+
'monkeyecx.com': 'scf/br',
|
|
2638
|
+
'monkey.exchange': 'scf/br',
|
|
2639
|
+
'monkeyexchange.cl': 'scf/cl',
|
|
2640
|
+
'sales.finance': 'sf',
|
|
2641
|
+
'spike.cash': 'spike',
|
|
2642
|
+
'monkey.credit': 'credit'
|
|
2643
|
+
}[domain];
|
|
2644
|
+
this.logo = `https://assets.monkey.exchange/${path}/wl/${handledToken}/login.svg`.toLowerCase();
|
|
2646
2645
|
}
|
|
2647
2646
|
}
|
|
2648
2647
|
|