tek-wallet 0.0.768 → 0.0.769

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.
@@ -58,6 +58,9 @@ function ActivityDetail(props) {
58
58
  return masterWallet;
59
59
  return activityData === null || activityData === void 0 ? void 0 : activityData.to_address;
60
60
  }, [activityData, isSwap, masterWallet]);
61
+ var message = (0, react_2.useMemo)(function () {
62
+ return activityData === null || activityData === void 0 ? void 0 : activityData.message;
63
+ }, [activityData]);
61
64
  var getStatusColor = (0, react_1.useCallback)(function () {
62
65
  switch (status) {
63
66
  case type_1.TransactionStatus.Processing:
@@ -77,9 +80,10 @@ function ActivityDetail(props) {
77
80
  }, [isIncrease, theme]);
78
81
  if (!activityData)
79
82
  return null;
80
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
83
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { filter: "drop-shadow(0 0 0.5rem #00000016)" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
81
84
  borderRadius: theme.mixins.customRadius.full,
82
85
  border: isSwap ? "0.25rem white solid" : "none",
86
+ // boxShadow: "0 0 20px 2px #00000029",
83
87
  // ml: "-0.5rem",
84
88
  } }), (swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link) && ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link, width: 64, sx: {
85
89
  borderRadius: theme.mixins.customRadius.full,
@@ -91,6 +95,6 @@ function ActivityDetail(props) {
91
95
  fontSize: theme.typography.fontSize12,
92
96
  textTransform: "capitalize",
93
97
  color: getStatusColor(),
94
- }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: 0, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) }))] })] }));
98
+ }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: 0, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) })), !!message && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Message" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "left" }), children: message }) })] }))] })] }));
95
99
  }
96
100
  exports.default = ActivityDetail;
@@ -98,11 +98,11 @@ function Result(props) {
98
98
  height: 20,
99
99
  borderRadius: "999px",
100
100
  } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: "inherit" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: toAmount }) })] }) }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Price", titleStyle: {
101
- fontSize: "0.6875rem",
101
+ fontSize: "0.875rem",
102
102
  fontWeight: 500,
103
103
  color: "gray.700",
104
104
  }, value: !!toTokenRate && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: ["1 ", fromToken === null || fromToken === void 0 ? void 0 : fromToken.name, " ~ ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: toTokenRate, unit: toToken === null || toToken === void 0 ? void 0 : toToken.name })] })), isAligned: true }), !!(transaction === null || transaction === void 0 ? void 0 : transaction.date_created) && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date", titleStyle: {
105
- fontSize: "0.6875rem",
105
+ fontSize: "0.875rem",
106
106
  fontWeight: 500,
107
107
  color: "gray.700",
108
108
  }, value: !!toTokenRate && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: formatDate(transaction === null || transaction === void 0 ? void 0 : transaction.date_created, true) })), isAligned: true }))] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
@@ -28,7 +28,7 @@ var DetailSwap = function (props) {
28
28
  color: theme.palette.text.accent2,
29
29
  fontSize: theme.typography.fontSize13,
30
30
  fontWeight: theme.typography.fontWeight400,
31
- }, children: "Transaction summary:" }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
31
+ }, children: "Transaction summary" }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
32
32
  color: theme.palette.text.accent,
33
33
  fontSize: theme.typography.fontSize12,
34
34
  fontWeight: theme.typography.fontWeight400,
@@ -1,19 +1,50 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
37
  };
5
38
  Object.defineProperty(exports, "__esModule", { value: true });
6
39
  var jsx_runtime_1 = require("react/jsx-runtime");
7
40
  var material_1 = require("@mui/material");
8
- var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
41
+ var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
9
42
  var react_1 = require("react");
10
43
  var react_qr_scanner_1 = require("@yudiel/react-qr-scanner");
11
44
  var AppBackDrop_1 = __importDefault(require("../AppBackDrop"));
12
45
  var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
13
46
  var PageHeader_1 = __importDefault(require("../PageHeader"));
14
47
  var providers_1 = require("../../../providers");
15
- var lottie_react_1 = __importDefault(require("lottie-react"));
16
- var reader_json_1 = __importDefault(require("./reader.json"));
17
48
  var STYLES = {
18
49
  borderWidth: "4px",
19
50
  borderColor: "#ffffff",
@@ -89,7 +120,7 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
89
120
  };
90
121
  }, []);
91
122
  var theme = (0, providers_1.useTheme)();
92
- return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onDone: onClose, onOpen: onOpen, sx: sx, className: className, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
123
+ return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onDone: onClose, onOpen: onOpen, sx: sx, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, className: className, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
93
124
  backgroundColor: "transparent !important",
94
125
  }, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
95
126
  position: "absolute",
@@ -118,14 +149,14 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
118
149
  transform: "translateX(-50%) translateY(-50%)",
119
150
  boxShadow: "0 0 2px max(50vw, 50dvh) rgba(0, 0, 0, 0.36)",
120
151
  color: "#C5E99F",
121
- }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-[100%] aspect-square absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-40", children: (0, jsx_runtime_1.jsx)(lottie_react_1.default, { animationData: reader_json_1.default, style: {
122
- width: "100%",
123
- height: "100%",
124
- position: "absolute",
125
- top: "50%",
126
- left: "50%",
127
- transform: "translate(-50%, -50%) scale(1)",
128
- } }) }), (0, jsx_runtime_1.jsx)("div", { style: {
152
+ }, children: [(0, jsx_runtime_1.jsx)("div", { className: "move-up-down-animation", style: {
153
+ position: "absolute",
154
+ left: 0,
155
+ top: 0,
156
+ width: "100%",
157
+ height: "100%",
158
+ borderTop: "2px solid currentColor",
159
+ } }), (0, jsx_runtime_1.jsx)("div", { style: {
129
160
  position: "absolute",
130
161
  borderTopLeftRadius: STYLES.borderRadius,
131
162
  top: "-".concat(STYLES.borderWidth),
@@ -519,8 +519,10 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
519
519
  }, children: [(0, jsx_runtime_1.jsx)("div", { id: "share-receive-info", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.mixins.column), { gap: theme.mixins.gaps.g12, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, padding: theme.mixins.customPadding.p16, paddingTop: "5rem", alignItems: "flex-start", position: "relative", marginTop: "4.6875rem" }), children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
520
520
  color: theme.palette.border.accent,
521
521
  width: "100%",
522
- } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.mixins.customRadius.r12, padding: theme.mixins.customPadding.p8 }), children: [(0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, logo: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, bgColor: "transparent", size: 150 }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { padding: theme.mixins.customPadding.p4, borderRadius: 9999, backgroundColor: theme.palette.background.white }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { crossOrigin: "anonymous", width: 24, height: 24, src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, sx: {
522
+ } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.mixins.customRadius.r12, padding: theme.mixins.customPadding.p8 }), children: [(0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, logo: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, bgColor: "transparent", size: 150 }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { padding: theme.mixins.customPadding.p4, borderRadius: 9999, backgroundColor: theme.palette.background.white }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { crossOrigin: "anonymous", src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, sx: {
523
523
  borderRadius: 9999,
524
+ width: 24,
525
+ height: 24,
524
526
  } }) })] }), isExternal && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), onClick: handleBack, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, cursor: "pointer", transition: "transform 0.3s ease-in-out", "&:active": {
525
527
  transform: "translateX(0.5rem)",
526
528
  } }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 24, height: 24, sx: {
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -46,28 +57,27 @@ var SvgPath_1 = require("../../../SvgPath");
46
57
  var Fees_1 = __importStar(require("../../../Fees"));
47
58
  var safeText_1 = require("../../../../../utils/safeText");
48
59
  var formatDate_1 = require("../../../../../utils/formatDate");
60
+ var providers_1 = require("../../../../../providers");
49
61
  function TransferInfo(props) {
50
62
  var type = props.type, message = props.message, datetime = props.datetime, recipientAddress = props.recipientAddress, amount = props.amount, estimateFee = props.estimateFee, estimateReceive = props.estimateReceive, selectedToken = props.selectedToken;
63
+ var theme = (0, providers_1.useTheme)();
51
64
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
52
65
  display: "flex",
53
66
  flexDirection: "column",
54
67
  gap: 3,
55
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
56
- fontSize: 16,
57
- fontWeight: 600,
58
- }, children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
68
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.headerTitle), { textAlign: "start", mr: "auto" }), children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
59
69
  display: "flex",
60
70
  flexDirection: "column",
61
71
  gap: 3,
62
72
  }, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
63
- fontSize: "0.6875rem",
73
+ fontSize: "0.875rem",
64
74
  fontWeight: 500,
65
75
  color: "gray.700",
66
76
  }, value: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
67
77
  fontSize: "0.875rem",
68
78
  fontWeight: 500,
69
79
  }, children: [amount, " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug.toUpperCase()] }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Address", titleStyle: {
70
- fontSize: "0.6875rem",
80
+ fontSize: "0.875rem",
71
81
  fontWeight: 500,
72
82
  color: "gray.700",
73
83
  }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
@@ -77,21 +87,21 @@ function TransferInfo(props) {
77
87
  width: 16,
78
88
  height: 16,
79
89
  }, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Type", titleStyle: {
80
- fontSize: "0.6875rem",
90
+ fontSize: "0.875rem",
81
91
  fontWeight: 500,
82
92
  color: "gray.700",
83
93
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
84
94
  fontSize: "0.875rem",
85
95
  fontWeight: 500,
86
96
  }, children: type }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
87
- fontSize: "0.6875rem",
97
+ fontSize: "0.875rem",
88
98
  fontWeight: 500,
89
99
  color: "gray.700",
90
100
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
91
101
  fontSize: "0.875rem",
92
102
  fontWeight: 500,
93
103
  }, children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Datetime", titleStyle: {
94
- fontSize: "0.6875rem",
104
+ fontSize: "0.875rem",
95
105
  fontWeight: 500,
96
106
  color: "gray.700",
97
107
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
@@ -103,7 +103,6 @@ var init_passcode_service_1 = __importDefault(require("../../../services/axios/i
103
103
  var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
104
104
  var xhub_keyboard_1 = require("xhub-keyboard");
105
105
  var useWarningWrongPasscode_1 = require("../../../hooks/useWarningWrongPasscode");
106
- var clsx_1 = __importDefault(require("clsx"));
107
106
  var passcodeLength = 6;
108
107
  var ChangePasscodeView = function (props) {
109
108
  var _a = props.isInitPasscode, isInitPasscode = _a === void 0 ? false : _a, _b = props.idPrefix, idPrefix = _b === void 0 ? "" : _b;
@@ -313,10 +312,13 @@ var ChangePasscodeView = function (props) {
313
312
  };
314
313
  var _j = getValueAndHandlerByStep(currentStep), value = _j.value, onChange = _j.onChange;
315
314
  var keyboardId = (0, react_2.useMemo)(function () { return "".concat(idPrefix, "-").concat(isInitPasscode ? "init" : "change", "-passcode-keyboard"); }, [isInitPasscode, idPrefix]);
316
- return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id: keyboardId, keyboardType: xhub_keyboard_1.KeyboardType.Text, layoutType: xhub_keyboard_1.LayoutType.Integer, value: value, onChange: onChange, viewFullHeight: true, classNames: {
317
- keyboardContainer: (0, clsx_1.default)({
318
- "!hidden": isLocked,
319
- }),
315
+ return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id: keyboardId, keyboardType: xhub_keyboard_1.KeyboardType.Text, layoutType: xhub_keyboard_1.LayoutType.Integer, value: value, onChange: onChange, viewFullHeight: true, styles: {
316
+ container: {
317
+ height: "100%",
318
+ },
319
+ keyboardContainer: {
320
+ display: isLocked ? "none" : "block",
321
+ },
320
322
  }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: handleBack, title: pageTitle, renderBack: function (Back) { return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { useBrowserInput: false, htmlFor: keyboardId, children: Back })); } }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", height: "100%" }, props.sx), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, disableSwipe: true, initialActiveTab: currentStep, sx: { height: "100%" }, swiperStyle: {
321
323
  flex: 1,
322
324
  }, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
@@ -60,10 +60,11 @@ var ActivityDataStatus;
60
60
  ActivityDataStatus["Filled"] = "filled";
61
61
  })(ActivityDataStatus || (ActivityDataStatus = {}));
62
62
  var DetailActivityView = function (props) {
63
+ var _a;
63
64
  var sx = props.sx, id = props.id;
64
- var _a = (0, useWallet_1.default)(), masterWallet = _a.masterWallet, activities = _a.activities;
65
- var _b = (0, react_1.useState)(ActivityDataStatus.Loading), activityDataStatus = _b[0], setActivityDataStatus = _b[1];
66
- var _c = (0, react_1.useState)(null), activityData = _c[0], setActivityData = _c[1];
65
+ var _b = (0, useWallet_1.default)(), masterWallet = _b.masterWallet, activities = _b.activities;
66
+ var _c = (0, react_1.useState)(ActivityDataStatus.Loading), activityDataStatus = _c[0], setActivityDataStatus = _c[1];
67
+ var _d = (0, react_1.useState)(null), activityData = _d[0], setActivityData = _d[1];
67
68
  (0, react_1.useEffect)(function () {
68
69
  var _a, _b;
69
70
  if (!id) {
@@ -111,7 +112,7 @@ var DetailActivityView = function (props) {
111
112
  }); })();
112
113
  }
113
114
  }, [activities, id, masterWallet]);
114
- return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Detail" }), sx: sx, children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { children: [activityDataStatus === ActivityDataStatus.Loading && (0, jsx_runtime_1.jsx)(LoadingView_1.default, {}), activityDataStatus === ActivityDataStatus.Filled && ((0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: activityData })), activityDataStatus === ActivityDataStatus.NotFound && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("empty_" + "all"), description: "Activity not found" })), activityDataStatus === ActivityDataStatus.Error && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("error_" + "detail_activity"), description: "Something went wrong, please try again later" }))] }) }));
115
+ return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "".concat(((_a = activityData === null || activityData === void 0 ? void 0 : activityData.transaction_type) === null || _a === void 0 ? void 0 : _a.name) || "", " Detail") }), sx: sx, children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { children: [activityDataStatus === ActivityDataStatus.Loading && (0, jsx_runtime_1.jsx)(LoadingView_1.default, {}), activityDataStatus === ActivityDataStatus.Filled && ((0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: activityData })), activityDataStatus === ActivityDataStatus.NotFound && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("empty_" + "all"), description: "Activity not found" })), activityDataStatus === ActivityDataStatus.Error && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("error_" + "detail_activity"), description: "Something went wrong, please try again later" }))] }) }));
115
116
  };
116
117
  exports.DetailActivityView = DetailActivityView;
117
118
  exports.default = exports.DetailActivityView;
@@ -112,22 +112,22 @@ function Result(props) {
112
112
  fontWeight: 600,
113
113
  fontSize: theme.typography.fontSize24,
114
114
  }, children: status })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.border.accent3, " solid") } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.bigValue), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "- ", value: amount, unit: tokenName }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.border.accent3, " solid") } }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
115
- fontSize: "0.6875rem",
115
+ fontSize: "0.875rem",
116
116
  fontWeight: 500,
117
117
  color: "gray.700",
118
118
  }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, safeText_1.safeText)(recipientAddress || "", { isShort: true }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
119
119
  width: 16,
120
120
  height: 16,
121
121
  }, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network", titleStyle: {
122
- fontSize: "0.6875rem",
122
+ fontSize: "0.875rem",
123
123
  fontWeight: 500,
124
124
  color: "gray.700",
125
125
  }, value: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.link, width: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.name })] }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
126
- fontSize: "0.6875rem",
126
+ fontSize: "0.875rem",
127
127
  fontWeight: 500,
128
128
  color: "gray.700",
129
129
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: message }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
130
- fontSize: "0.6875rem",
130
+ fontSize: "0.875rem",
131
131
  fontWeight: 500,
132
132
  color: "gray.700",
133
133
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: formatDate(dateCreated, true) }), isAligned: true })), !!feeInfo && ((0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: feeInfo, amount: +(amount || 0), tokenSlug: (response === null || response === void 0 ? void 0 : response.currency_slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT }))] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
@@ -136,5 +136,5 @@ function Result(props) {
136
136
  display: "grid",
137
137
  gridTemplateColumns: "1fr",
138
138
  gap: theme.mixins.gaps.g8,
139
- }, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, onClick: onDone, children: "Done c" }) })] }));
139
+ }, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, onClick: onDone, children: "Done" }) })] }));
140
140
  }
@@ -89,24 +89,24 @@ function Summary(props) {
89
89
  }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.headerTitle), { textAlign: "start", mr: "auto" }), children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
90
90
  display: "flex",
91
91
  flexDirection: "column",
92
- gap: 3,
92
+ gap: theme.mixins.gaps.g12,
93
93
  }, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
94
- fontSize: "0.6875rem",
94
+ fontSize: "0.875rem",
95
95
  fontWeight: 500,
96
96
  color: "gray.700",
97
97
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
98
- fontSize: "0.6875rem",
98
+ fontSize: "0.875rem",
99
99
  fontWeight: 500,
100
100
  color: "gray.700",
101
101
  }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, safeText_1.safeText)(recipientAddress || "", { isShort: true }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
102
102
  width: 16,
103
103
  height: 16,
104
104
  }, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network", titleStyle: {
105
- fontSize: "0.6875rem",
105
+ fontSize: "0.875rem",
106
106
  fontWeight: 500,
107
107
  color: "gray.700",
108
108
  }, value: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: payload.network.link, width: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: payload.network.name })] }), isAligned: true }), memo && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Comment", titleStyle: {
109
- fontSize: "0.6875rem",
109
+ fontSize: "0.875rem",
110
110
  fontWeight: 500,
111
111
  color: "gray.700",
112
112
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: memo }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +(amount || 0), tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(ConfirmSendExternal_1.default, __assign({ sx: {
@@ -104,18 +104,18 @@ function Result(props) {
104
104
  fontWeight: 600,
105
105
  fontSize: theme.typography.fontSize24,
106
106
  }, children: status })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.border.accent3, " solid") } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.bigValue), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "- ", value: amount, unit: tokenName }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.border.accent3, " solid") } }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
107
- fontSize: "0.6875rem",
107
+ fontSize: "0.875rem",
108
108
  fontWeight: 500,
109
109
  color: "gray.700",
110
110
  }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, safeText_1.safeText)(recipientAddress || "", { isShort: true }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
111
111
  width: 16,
112
112
  height: 16,
113
113
  }, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
114
- fontSize: "0.6875rem",
114
+ fontSize: "0.875rem",
115
115
  fontWeight: 500,
116
116
  color: "gray.700",
117
117
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: message }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
118
- fontSize: "0.6875rem",
118
+ fontSize: "0.875rem",
119
119
  fontWeight: 500,
120
120
  color: "gray.700",
121
121
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: formatDate(dateCreated, true) }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: feeInfo || estimateFee, amount: +(amount || 0), tokenSlug: ((_j = response === null || response === void 0 ? void 0 : response.data) === null || _j === void 0 ? void 0 : _j.currency_slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
@@ -90,18 +90,18 @@ function Summary(props) {
90
90
  flexDirection: "column",
91
91
  gap: 3,
92
92
  }, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
93
- fontSize: "0.6875rem",
93
+ fontSize: "0.875rem",
94
94
  fontWeight: 500,
95
95
  color: "gray.700",
96
96
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
97
- fontSize: "0.6875rem",
97
+ fontSize: "0.875rem",
98
98
  fontWeight: 500,
99
99
  color: "gray.700",
100
100
  }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, safeText_1.safeText)(recipientAddress || "", { isShort: true }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
101
101
  width: 16,
102
102
  height: 16,
103
103
  }, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
104
- fontSize: "0.6875rem",
104
+ fontSize: "0.875rem",
105
105
  fontWeight: 500,
106
106
  color: "gray.700",
107
107
  }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +(amount || 0), tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(ConfirmSendInternal_1.default, __assign({ sx: {
@@ -39,6 +39,7 @@ export interface Transaction {
39
39
  currency_data: Currency;
40
40
  to_currency_data?: ToCurrencyData;
41
41
  to_amount?: string;
42
+ message?: string;
42
43
  }
43
44
  export interface ToCurrencyData {
44
45
  decimal: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.768",
3
+ "version": "0.0.769",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",