tek-wallet 0.0.488 → 0.0.490
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.
|
@@ -84,7 +84,7 @@ var CustomTooltip = React.forwardRef(function (_a, ref) {
|
|
|
84
84
|
};
|
|
85
85
|
var open = Boolean(anchorEl);
|
|
86
86
|
var id = open ? "simple-popover" : undefined;
|
|
87
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: cancelPropagation, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "button", disabled: disabled, "aria-describedby": id, onClick: handleOpen, sx: { textAlign: "left" }, children: trigger }), (0, jsx_runtime_1.jsx)(Popover_1.default, __assign({ id: id, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: anchorOrigin, anchorPosition: anchorPosition, transformOrigin: transformOrigin, sx: {
|
|
87
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: cancelPropagation, sx: { display: "inline-block" }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "button", disabled: disabled, "aria-describedby": id, onClick: handleOpen, sx: { textAlign: "left" }, children: trigger }), (0, jsx_runtime_1.jsx)(Popover_1.default, __assign({ id: id, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: anchorOrigin, anchorPosition: anchorPosition, transformOrigin: transformOrigin, sx: {
|
|
88
88
|
"& .MuiPopover-paper": {
|
|
89
89
|
backgroundColor: "transparent",
|
|
90
90
|
},
|
|
@@ -106,7 +106,7 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
106
106
|
var _c = (0, react_1.useState)(), selectedToken = _c[0], setSelectedToken = _c[1];
|
|
107
107
|
var _d = (0, react_1.useState)(), selectedNetwork = _d[0], setSelectedNetwork = _d[1];
|
|
108
108
|
var _e = (0, useWalletData_1.default)(), isAuthenticated = _e.isAuthenticated, blockchainWallets = _e.blockchainWallets, masterWallet = _e.masterWallet;
|
|
109
|
-
var _f = (0, react_1.useState)(
|
|
109
|
+
var _f = (0, react_1.useState)(""), inputAmount = _f[0], setInputAmount = _f[1];
|
|
110
110
|
var _g = (0, react_1.useState)(""), amount = _g[0], setAmount = _g[1];
|
|
111
111
|
var _h = (0, react_1.useState)(""), amountError = _h[0], setAmountError = _h[1];
|
|
112
112
|
var _j = (0, useReceiveData_1.default)(), receiveExternalTokens = _j.receiveExternalTokens, updateReceiveExternalToken = _j.updateReceiveExternalToken, receiveInternalTokens = _j.receiveInternalTokens, updateReceiveInternalToken = _j.updateReceiveInternalToken;
|
|
@@ -170,7 +170,7 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
170
170
|
return null;
|
|
171
171
|
}, [selectedMethod, selectedToken, amount]);
|
|
172
172
|
var clearValues = function () {
|
|
173
|
-
setInputAmount(
|
|
173
|
+
setInputAmount("");
|
|
174
174
|
setAmount("");
|
|
175
175
|
setAmountError("");
|
|
176
176
|
setSelectedToken(undefined);
|
|
@@ -251,8 +251,10 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
251
251
|
var handleClickMaxAmount = function () {
|
|
252
252
|
if (!selectedToken)
|
|
253
253
|
return;
|
|
254
|
-
var balance =
|
|
255
|
-
|
|
254
|
+
var balance = +(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value);
|
|
255
|
+
var amountNumber = balance || "";
|
|
256
|
+
setAmount(amountNumber);
|
|
257
|
+
setInputAmount(amountNumber);
|
|
256
258
|
};
|
|
257
259
|
var handleChangeAmount = function (e) {
|
|
258
260
|
var amountNumber = Number(e.target.value);
|
|
@@ -269,8 +271,8 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
269
271
|
};
|
|
270
272
|
var handleUnset = function () {
|
|
271
273
|
var _a;
|
|
272
|
-
setAmount(
|
|
273
|
-
setInputAmount(
|
|
274
|
+
setAmount("");
|
|
275
|
+
setInputAmount("");
|
|
274
276
|
(_a = amountDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
275
277
|
};
|
|
276
278
|
var handleOnClose = function () {
|