tek-wallet 0.0.326 → 0.0.328
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.
|
@@ -115,7 +115,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
115
115
|
var isAuthenticated = (0, useWalletData_1.default)().isAuthenticated;
|
|
116
116
|
var _d = (0, useWithdrawData_1.default)(), withdrawTokens = _d.withdrawTokens, updateWithdrawToken = _d.updateWithdrawToken;
|
|
117
117
|
var _e = (0, react_1.useState)(), infoDialogContent = _e[0], setInfoDialogContent = _e[1];
|
|
118
|
-
var _f = (0, react_1.useState)(""), amount = _f[0],
|
|
118
|
+
var _f = (0, react_1.useState)(""), amount = _f[0], setAmountV2 = _f[1];
|
|
119
119
|
var _g = (0, react_1.useState)(undefined), memo = _g[0], setMemo = _g[1];
|
|
120
120
|
var _h = (0, react_1.useState)(undefined), recipientAddress = _h[0], setRecipientAddress = _h[1];
|
|
121
121
|
var _j = (0, react_1.useState)(), amountErrorMessage = _j[0], setAmountErrorMessage = _j[1];
|
|
@@ -139,13 +139,9 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
139
139
|
}
|
|
140
140
|
return newNetWorks;
|
|
141
141
|
}, [selectedToken, selectedNetwork]);
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
clearValues();
|
|
146
|
-
}
|
|
147
|
-
setCurrentStep(step);
|
|
148
|
-
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(step);
|
|
142
|
+
var setAmount = function (value) {
|
|
143
|
+
console.warn("🚀 ~ setAmount ~ value:", value);
|
|
144
|
+
setAmountV2(value);
|
|
149
145
|
};
|
|
150
146
|
var clearValues = function () {
|
|
151
147
|
setSelectedToken(undefined);
|
|
@@ -158,7 +154,14 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
158
154
|
setRecipientAddressInternal(undefined);
|
|
159
155
|
setAmountError(undefined);
|
|
160
156
|
setAmountErrorMessage(undefined);
|
|
161
|
-
|
|
157
|
+
};
|
|
158
|
+
var gotoStep = function (step) {
|
|
159
|
+
var _a;
|
|
160
|
+
if (step === WithdrawStep.SELECT_METHOD) {
|
|
161
|
+
clearValues();
|
|
162
|
+
}
|
|
163
|
+
setCurrentStep(step);
|
|
164
|
+
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(step);
|
|
162
165
|
};
|
|
163
166
|
var open = function () {
|
|
164
167
|
var _a;
|
|
@@ -167,7 +170,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
167
170
|
var close = function () {
|
|
168
171
|
var _a;
|
|
169
172
|
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
170
|
-
|
|
173
|
+
gotoStep(WithdrawStep.SELECT_METHOD);
|
|
171
174
|
};
|
|
172
175
|
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
173
176
|
open: open,
|
|
@@ -219,7 +222,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
219
222
|
};
|
|
220
223
|
var handleOnClose = function (e) {
|
|
221
224
|
var _a;
|
|
222
|
-
|
|
225
|
+
gotoStep(WithdrawStep.SELECT_METHOD);
|
|
223
226
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
224
227
|
};
|
|
225
228
|
var findWithdrawToken = function (contract_address) {
|