tek-wallet 0.0.313 → 0.0.315
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.
|
@@ -156,22 +156,27 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
156
156
|
var handleChangeMemo = function (e) {
|
|
157
157
|
setMemo(e.target.value);
|
|
158
158
|
};
|
|
159
|
+
var clearValues = function () {
|
|
160
|
+
setSelectedToken(undefined);
|
|
161
|
+
setSelectedNetwork(undefined);
|
|
162
|
+
setAmount("");
|
|
163
|
+
setMemo("");
|
|
164
|
+
setRecipientAddress("");
|
|
165
|
+
setSelectedMethod(undefined);
|
|
166
|
+
setSendInfoGet(undefined);
|
|
167
|
+
setRecipientAddressInternal(undefined);
|
|
168
|
+
};
|
|
159
169
|
var gotoStep = function (step) {
|
|
160
170
|
var _a;
|
|
171
|
+
if (step === WithdrawStep.SELECT_METHOD) {
|
|
172
|
+
clearValues();
|
|
173
|
+
}
|
|
161
174
|
setCurrentStep(step);
|
|
162
175
|
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(step);
|
|
163
176
|
};
|
|
164
177
|
var handleReSelectNetwork = function () {
|
|
165
178
|
gotoStep(WithdrawStep.SELECT_NETWORK);
|
|
166
179
|
};
|
|
167
|
-
var clearValues = function () {
|
|
168
|
-
setSelectedToken(undefined);
|
|
169
|
-
setSelectedNetwork(undefined);
|
|
170
|
-
setAmount("");
|
|
171
|
-
setMemo("");
|
|
172
|
-
setRecipientAddress("");
|
|
173
|
-
gotoStep(WithdrawStep.SELECT_METHOD);
|
|
174
|
-
};
|
|
175
180
|
var handleOnClose = function (e) {
|
|
176
181
|
var _a;
|
|
177
182
|
clearValues();
|
|
@@ -189,7 +194,6 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
189
194
|
}
|
|
190
195
|
else {
|
|
191
196
|
setSelectedToken(tokenSet);
|
|
192
|
-
setSelectedNetwork(tokenSet === null || tokenSet === void 0 ? void 0 : tokenSet.network_data);
|
|
193
197
|
gotoStep(WithdrawStep.CONFIRM);
|
|
194
198
|
}
|
|
195
199
|
setSelectedMethod(SendMethods.TRANSFER_INTERNAL);
|
|
@@ -200,6 +204,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
200
204
|
var _a;
|
|
201
205
|
(_a = suggestUseTransferInternalDialogRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
202
206
|
var tokenSet = findWithdrawToken((sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.jetton) || "");
|
|
207
|
+
console.warn("🚀 ~ handleSelectContinueTransferExternal ~ tokenSet:", tokenSet);
|
|
203
208
|
if (!tokenSet) {
|
|
204
209
|
gotoStep(WithdrawStep.SELECT_TOKEN);
|
|
205
210
|
}
|
|
@@ -210,7 +215,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
210
215
|
}
|
|
211
216
|
setSelectedMethod(SendMethods.TRANSFER_EXTERNAL);
|
|
212
217
|
setRecipientAddress(sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.address);
|
|
213
|
-
setAmount(
|
|
218
|
+
setAmount("12");
|
|
214
219
|
setMemo(sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.text);
|
|
215
220
|
};
|
|
216
221
|
var handleSelectMethod = function (method) {
|
|
@@ -245,14 +250,12 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
245
250
|
}
|
|
246
251
|
};
|
|
247
252
|
var handleBack = function () {
|
|
248
|
-
var _a;
|
|
249
253
|
if (currentStep === WithdrawStep.CONFIRM &&
|
|
250
254
|
selectedMethod === SendMethods.TRANSFER_INTERNAL) {
|
|
251
255
|
gotoStep(WithdrawStep.SELECT_TOKEN);
|
|
252
256
|
return;
|
|
253
257
|
}
|
|
254
|
-
(
|
|
255
|
-
setCurrentStep(function (prev) { return prev - 1; });
|
|
258
|
+
gotoStep(currentStep - 1);
|
|
256
259
|
};
|
|
257
260
|
var handleSelectToken = function (token) {
|
|
258
261
|
console.warn("🚀 ~ handleSelectToken ~ token:", token);
|