@traund/orquezta-widget-calculator 1.0.3 → 1.0.4
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/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/module.js +9 -8
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/src/core/endpoints.js +1 -1
- package/src/simulator.js +3 -3
- package/src/utils/calculateHelper.js +3 -2
- package/src/utils/operationsHelper.js +1 -1
- package/src/utils/rateHelper.js +1 -1
package/package.json
CHANGED
package/src/core/endpoints.js
CHANGED
|
@@ -3,7 +3,7 @@ import { BACKEND_SETTINGS } from "./backend-settings";
|
|
|
3
3
|
class EndPoints {
|
|
4
4
|
constructor(testMode = 'production', externalConfig = null) {
|
|
5
5
|
this._testMode = testMode;
|
|
6
|
-
this.baseUrl = externalConfig
|
|
6
|
+
this.baseUrl = externalConfig?.backendUrl;
|
|
7
7
|
this.path_managment_operations = `${this.baseUrl}/handle-operations`;
|
|
8
8
|
}
|
|
9
9
|
|
package/src/simulator.js
CHANGED
|
@@ -33,9 +33,9 @@ function Simulator(props) {
|
|
|
33
33
|
const content = locale === "es" ? es : en;
|
|
34
34
|
const classes = useStyles();
|
|
35
35
|
|
|
36
|
-
const __ENDPOINTS = new Endpoints(props.testMode, props.config
|
|
37
|
-
const __calculateHelper = new CalculateHelper(props.testMode);
|
|
38
|
-
const __operationsHelper = new OperationsHelper(props.testMode, props.reference);
|
|
36
|
+
const __ENDPOINTS = new Endpoints(props.testMode, props.config);
|
|
37
|
+
const __calculateHelper = new CalculateHelper(props.testMode, props.config);
|
|
38
|
+
const __operationsHelper = new OperationsHelper(props.testMode, props.reference,props.config);
|
|
39
39
|
|
|
40
40
|
const __firebase = loadFirebaseDB(props.testMode, props.config);
|
|
41
41
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import RateHelper from "./rateHelper";
|
|
2
2
|
|
|
3
3
|
class CalculateHelper {
|
|
4
|
-
constructor(testMode = 'production') {
|
|
4
|
+
constructor(testMode = 'production',config=null) {
|
|
5
5
|
this._testMode = testMode;
|
|
6
|
+
this.config = config;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
async getCaculateRates(countriesData) {
|
|
9
|
-
const rateHelper = new RateHelper(this._testMode);
|
|
10
|
+
const rateHelper = new RateHelper(this._testMode, this.config);
|
|
10
11
|
const middleCurrency = "USD";
|
|
11
12
|
|
|
12
13
|
for (var key in countriesData) {
|
|
@@ -8,7 +8,7 @@ import { config } from "aws-sdk";
|
|
|
8
8
|
|
|
9
9
|
class OperationsHelper {
|
|
10
10
|
constructor(testMode = 'production', secretKey = null, config=null) {
|
|
11
|
-
this.endpoints = new EndPoints(testMode,config
|
|
11
|
+
this.endpoints = new EndPoints(testMode, config);
|
|
12
12
|
this.reference = secretKey;
|
|
13
13
|
this.FEES = {
|
|
14
14
|
"ach": { type: "A", value: 0 },
|
package/src/utils/rateHelper.js
CHANGED
|
@@ -3,7 +3,7 @@ import EndPoints from "../core/endpoints";
|
|
|
3
3
|
|
|
4
4
|
class RateHelper {
|
|
5
5
|
constructor(testMode = 'production',externalConfig = null) {
|
|
6
|
-
this.endpoints = new EndPoints(testMode, externalConfig
|
|
6
|
+
this.endpoints = new EndPoints(testMode, externalConfig);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
async getExchangeRate(currencyFrom, currencyTo) {
|