tek-wallet 0.0.454 → 0.0.456
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.
|
@@ -283,7 +283,10 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
283
283
|
gotoStep(ReceiveStep.SELECT_METHOD);
|
|
284
284
|
};
|
|
285
285
|
(0, react_1.useEffect)(function () {
|
|
286
|
-
|
|
286
|
+
console.warn("🚀 ~ useEffect ~ isAuthenticated:", isAuthenticated, receiveExternalTokens, isLoadingReceiveExternalToken, receiveInternalTokens, isLoadingReceiveInternalToken);
|
|
287
|
+
if (isAuthenticated &&
|
|
288
|
+
!receiveExternalTokens &&
|
|
289
|
+
!isLoadingReceiveExternalToken) {
|
|
287
290
|
updateReceiveExternalToken();
|
|
288
291
|
}
|
|
289
292
|
if (isAuthenticated &&
|
|
@@ -291,7 +294,13 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
291
294
|
!isLoadingReceiveInternalToken) {
|
|
292
295
|
updateReceiveInternalToken();
|
|
293
296
|
}
|
|
294
|
-
}, [
|
|
297
|
+
}, [
|
|
298
|
+
isAuthenticated,
|
|
299
|
+
isLoadingReceiveExternalToken,
|
|
300
|
+
isLoadingReceiveInternalToken,
|
|
301
|
+
receiveExternalTokens,
|
|
302
|
+
receiveInternalTokens,
|
|
303
|
+
]);
|
|
295
304
|
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: {
|
|
296
305
|
width: "100%",
|
|
297
306
|
display: "flex",
|
|
@@ -127,24 +127,27 @@ function ReceiveProvider(_a) {
|
|
|
127
127
|
return __generator(this, function (_a) {
|
|
128
128
|
switch (_a.label) {
|
|
129
129
|
case 0:
|
|
130
|
-
|
|
130
|
+
console.warn("🚀 ~ updateReceiveInternalToken ~ isAuthenticated:", isAuthenticated);
|
|
131
|
+
_a.label = 1;
|
|
132
|
+
case 1:
|
|
133
|
+
_a.trys.push([1, 3, , 4]);
|
|
131
134
|
if (!isAuthenticated) {
|
|
132
135
|
throw new Error("Authenticate to get receive tokens");
|
|
133
136
|
}
|
|
134
137
|
setIsLoadingReceiveInternalToken(true);
|
|
135
138
|
return [4 /*yield*/, (0, get_receive_internal_tokens_list_service_1.default)()];
|
|
136
|
-
case
|
|
139
|
+
case 2:
|
|
137
140
|
response = _a.sent();
|
|
138
141
|
console.warn("🚀 ~ getBalance ~ response:", response);
|
|
139
142
|
setReceiveInternalTokens(response === null || response === void 0 ? void 0 : response.supported_tokens);
|
|
140
143
|
setIsLoadingReceiveInternalToken(false);
|
|
141
|
-
return [3 /*break*/,
|
|
142
|
-
case
|
|
144
|
+
return [3 /*break*/, 4];
|
|
145
|
+
case 3:
|
|
143
146
|
error_2 = _a.sent();
|
|
144
147
|
console.error("🚀 ~ getBalance ~ error:", error_2);
|
|
145
148
|
setIsLoadingReceiveInternalToken(false);
|
|
146
|
-
return [3 /*break*/,
|
|
147
|
-
case
|
|
149
|
+
return [3 /*break*/, 4];
|
|
150
|
+
case 4: return [2 /*return*/];
|
|
148
151
|
}
|
|
149
152
|
});
|
|
150
153
|
}); }, [isAuthenticated]);
|