tek-wallet 0.0.409 → 0.0.411
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.
|
@@ -39,12 +39,24 @@ var Button = function (props) {
|
|
|
39
39
|
};
|
|
40
40
|
Button.displayName = "Button";
|
|
41
41
|
Button.Primary = function (props) {
|
|
42
|
-
var
|
|
42
|
+
var _a;
|
|
43
|
+
var sx = props.sx, children = props.children, _b = props.status, status = _b === void 0 ? BUTTON_STATUS.ENABLED : _b, rest = __rest(props, ["sx", "children", "status"]);
|
|
43
44
|
var theme = (0, material_1.useTheme)();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
var disabledStyles = (_a = {},
|
|
46
|
+
_a[BUTTON_STATUS.LOADING] = {
|
|
47
|
+
backgroundColor: theme.palette.background.secondary16,
|
|
48
|
+
color: theme.palette.background.secondary,
|
|
49
|
+
},
|
|
50
|
+
_a[BUTTON_STATUS.ERROR] = {
|
|
51
|
+
backgroundColor: theme.palette.background.error16,
|
|
52
|
+
color: theme.palette.background.error,
|
|
53
|
+
},
|
|
54
|
+
_a[BUTTON_STATUS.DISABLED] = {
|
|
55
|
+
backgroundColor: theme.palette.background.white16,
|
|
56
|
+
color: theme.palette.text.white24,
|
|
57
|
+
},
|
|
58
|
+
_a);
|
|
59
|
+
return ((0, jsx_runtime_1.jsx)(Button, __assign({}, rest, { variant: "contained", color: "primary", sx: __assign({ borderRadius: theme.mixins.theBorderRadius.full, "&.Mui-disabled": __assign({}, disabledStyles[status]) }, sx), children: children })));
|
|
48
60
|
};
|
|
49
61
|
Button.Primary.displayName = "Button.Primary";
|
|
50
62
|
Button.Secondary = function (props) {
|
|
@@ -362,7 +362,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
362
362
|
break;
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
|
-
var
|
|
365
|
+
var getEstimateFee = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
366
366
|
var response;
|
|
367
367
|
return __generator(this, function (_a) {
|
|
368
368
|
switch (_a.label) {
|
|
@@ -383,7 +383,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
383
383
|
return [2 /*return*/];
|
|
384
384
|
}
|
|
385
385
|
});
|
|
386
|
-
}); }, [amount, selectedToken
|
|
386
|
+
}); }, [amount, selectedToken, amountError]);
|
|
387
387
|
var openScannerAddressQrCode = function () {
|
|
388
388
|
var _a;
|
|
389
389
|
(_a = scannerAddressQrCodeRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
@@ -607,8 +607,8 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
607
607
|
validateAmount();
|
|
608
608
|
}, [validateAmount]);
|
|
609
609
|
(0, react_1.useEffect)(function () {
|
|
610
|
-
|
|
611
|
-
}, [
|
|
610
|
+
getEstimateFee();
|
|
611
|
+
}, [getEstimateFee]);
|
|
612
612
|
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.jsxs)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: {
|
|
613
613
|
width: "100%",
|
|
614
614
|
display: "flex",
|
package/dist/theme/mui/theme.js
CHANGED