tek-wallet 0.0.227 → 0.0.229
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.
|
@@ -205,7 +205,7 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
205
205
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
206
206
|
};
|
|
207
207
|
(0, react_1.useEffect)(function () {
|
|
208
|
-
if (isAuthenticated) {
|
|
208
|
+
if (isAuthenticated && !depositTokens) {
|
|
209
209
|
updateDepositToken();
|
|
210
210
|
}
|
|
211
211
|
}, [isAuthenticated]);
|
|
@@ -128,7 +128,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
128
128
|
nextStep();
|
|
129
129
|
};
|
|
130
130
|
(0, react_1.useEffect)(function () {
|
|
131
|
-
if (isAuthenticated) {
|
|
131
|
+
if (isAuthenticated && !withdrawTokens) {
|
|
132
132
|
console.warn("🚀 ~ updateWithdrawToken ~ isAuthenticated:", isAuthenticated);
|
|
133
133
|
updateWithdrawToken();
|
|
134
134
|
}
|
|
@@ -95,24 +95,28 @@ function WithdrawProvider(_a) {
|
|
|
95
95
|
return __generator(this, function (_a) {
|
|
96
96
|
switch (_a.label) {
|
|
97
97
|
case 0:
|
|
98
|
-
|
|
98
|
+
console.warn("🚀 ~ updateWithdrawToken ~ updateWithdrawToken:", isAuthenticated);
|
|
99
|
+
_a.label = 1;
|
|
100
|
+
case 1:
|
|
101
|
+
_a.trys.push([1, 3, , 4]);
|
|
99
102
|
if (!isAuthenticated) {
|
|
100
103
|
throw new Error("Authenticate to get withdraw tokens");
|
|
101
104
|
}
|
|
102
105
|
setIsLoadingWithdrawToken(true);
|
|
103
106
|
return [4 /*yield*/, (0, get_withdraw_tokens_list_service_1.default)()];
|
|
104
|
-
case
|
|
107
|
+
case 2:
|
|
105
108
|
response = _a.sent();
|
|
106
109
|
console.warn("🚀 ~ getBalance getWithdrawTokenList ~ response:", response);
|
|
107
110
|
setWithdrawTokens(response === null || response === void 0 ? void 0 : response.supported_tokens);
|
|
108
111
|
setIsLoadingWithdrawToken(false);
|
|
109
|
-
return [3 /*break*/,
|
|
110
|
-
case
|
|
112
|
+
return [3 /*break*/, 4];
|
|
113
|
+
case 3:
|
|
111
114
|
error_1 = _a.sent();
|
|
112
|
-
console.error("🚀 ~ getBalance ~ error:", error_1);
|
|
115
|
+
console.error("🚀 ~ getBalance ~ error getWithdrawTokenList:", error_1);
|
|
116
|
+
setWithdrawTokens(undefined);
|
|
113
117
|
setIsLoadingWithdrawToken(false);
|
|
114
|
-
return [3 /*break*/,
|
|
115
|
-
case
|
|
118
|
+
return [3 /*break*/, 4];
|
|
119
|
+
case 4: return [2 /*return*/];
|
|
116
120
|
}
|
|
117
121
|
});
|
|
118
122
|
}); }, [isAuthenticated]);
|