@teamdigipay/dgepay-customer-transaction-package 0.0.4 → 0.0.6
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.
|
@@ -623,7 +623,6 @@ TransactionController.validateThresholdWise = (config, payload, onData, onError)
|
|
|
623
623
|
currency_id: currencyId
|
|
624
624
|
}, (userThresholdData) => __awaiter(void 0, void 0, void 0, function* () {
|
|
625
625
|
console.log("userThresholdData ::::::::::", JSON.stringify(userThresholdData));
|
|
626
|
-
thresholdType = userThresholdData === null || userThresholdData === void 0 ? void 0 : userThresholdData.threshold_type;
|
|
627
626
|
userThresholdAmount = userThresholdData === null || userThresholdData === void 0 ? void 0 : userThresholdData.threshold_amount;
|
|
628
627
|
userThresholdTxn = userThresholdData === null || userThresholdData === void 0 ? void 0 : userThresholdData.threshold_no_txn;
|
|
629
628
|
(0, ProfileThresholdHelpers_1.getUserProfileHelper)(config, {
|
|
@@ -642,6 +641,7 @@ TransactionController.validateThresholdWise = (config, payload, onData, onError)
|
|
|
642
641
|
console.log("thresholdData ::::::::::", JSON.stringify(thresholdData));
|
|
643
642
|
thresholdAmount = thresholdData === null || thresholdData === void 0 ? void 0 : thresholdData.threshold_amount;
|
|
644
643
|
thresholdTxn = thresholdData === null || thresholdData === void 0 ? void 0 : thresholdData.threshold_no_txn;
|
|
644
|
+
thresholdType = thresholdData === null || thresholdData === void 0 ? void 0 : thresholdData.threshold_type;
|
|
645
645
|
if ((amount > (thresholdData === null || thresholdData === void 0 ? void 0 : thresholdData.max_amount)) && ((thresholdData === null || thresholdData === void 0 ? void 0 : thresholdData.max_amount) !== null)) {
|
|
646
646
|
onError("You can not enter amount more than " +
|
|
647
647
|
(thresholdData === null || thresholdData === void 0 ? void 0 : thresholdData.max_amount));
|
|
@@ -17,7 +17,7 @@ const DatadogTxn_1 = require("../utils/DatadogTxn");
|
|
|
17
17
|
const netinfo_1 = require("@react-native-community/netinfo");
|
|
18
18
|
const Strings_1 = require("../utils/Strings");
|
|
19
19
|
exports.default = (apiConfig, apiPayload, onSuccess, onFailure) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
var _a, _b, _c;
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
21
|
const isConnected = yield netinfo_1.default.fetch();
|
|
22
22
|
console.log('Internet connection', isConnected);
|
|
23
23
|
if (!isConnected.isConnected) {
|
|
@@ -59,12 +59,9 @@ exports.default = (apiConfig, apiPayload, onSuccess, onFailure) => __awaiter(voi
|
|
|
59
59
|
// headers = { ...apiPayload.headersFlutterWave }
|
|
60
60
|
// }
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// "Content-Type": "multipart/form-data",
|
|
66
|
-
// };
|
|
67
|
-
// }
|
|
62
|
+
if ((_d = apiPayload === null || apiPayload === void 0 ? void 0 : apiPayload.data) === null || _d === void 0 ? void 0 : _d._parts) {
|
|
63
|
+
headers = Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" });
|
|
64
|
+
}
|
|
68
65
|
let config = {
|
|
69
66
|
baseURL: endPoint,
|
|
70
67
|
timeout: apiConfig.timeout || 6000000000,
|
package/package.json
CHANGED
|
@@ -825,7 +825,6 @@ export class TransactionController {
|
|
|
825
825
|
|
|
826
826
|
console.log("userThresholdData ::::::::::", JSON.stringify(userThresholdData))
|
|
827
827
|
|
|
828
|
-
thresholdType = userThresholdData?.threshold_type;
|
|
829
828
|
|
|
830
829
|
userThresholdAmount = userThresholdData?.threshold_amount;
|
|
831
830
|
userThresholdTxn = userThresholdData?.threshold_no_txn;
|
|
@@ -852,6 +851,7 @@ export class TransactionController {
|
|
|
852
851
|
|
|
853
852
|
thresholdAmount = thresholdData?.threshold_amount;
|
|
854
853
|
thresholdTxn = thresholdData?.threshold_no_txn;
|
|
854
|
+
thresholdType = thresholdData?.threshold_type;
|
|
855
855
|
|
|
856
856
|
|
|
857
857
|
if ((amount > thresholdData?.max_amount) && (thresholdData?.max_amount !== null)) {
|
|
@@ -56,7 +56,7 @@ const isConnected: NetInfoState = await NetInfo.fetch()
|
|
|
56
56
|
success: false
|
|
57
57
|
})
|
|
58
58
|
console.log('Please, Check your Internet Connection..!!!!!!!!!!!!!!!')
|
|
59
|
-
}
|
|
59
|
+
}
|
|
60
60
|
else{
|
|
61
61
|
const method: METHOD = apiConfig.method || "get";
|
|
62
62
|
|
|
@@ -101,12 +101,12 @@ const isConnected: NetInfoState = await NetInfo.fetch()
|
|
|
101
101
|
// }
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
if (apiPayload?.data?._parts) {
|
|
105
|
+
headers = {
|
|
106
|
+
...headers,
|
|
107
|
+
"Content-Type": "multipart/form-data",
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|