tek-wallet 0.0.801 → 0.0.804

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.
@@ -42,7 +42,7 @@ var TokenItem = function (props) {
42
42
  py: theme.mixins.customPadding.p8,
43
43
  }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20, sx: {
44
44
  borderRadius: theme.mixins.customRadius.full,
45
- }, src: currency.link }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: currency.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: currency.full_name })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g1, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700 }), children: isShowBalance ? (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance }) : "****" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: isShowBalance ? (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "$", value: balanceInUSD }) : "****" })] }), false && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g1, textAlign: "right" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontWeight: theme.typography.fontWeight700 }), children: isShowBalance ? ((0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 70000 })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
45
+ }, src: currency.link }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: currency.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: currency.full_name })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g1, justifyContent: "center", alignItems: "end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700 }), children: isShowBalance ? (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance }) : "****" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: isShowBalance ? (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "$", value: balanceInUSD }) : "****" })] }), false && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g1, textAlign: "right" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontWeight: theme.typography.fontWeight700 }), children: isShowBalance ? ((0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 70000 })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
46
46
  fontSize: theme.typography.fontSize14,
47
47
  fontWeight: theme.typography.fontWeight600,
48
48
  color: theme.palette.text.black,
@@ -14,16 +14,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var jsx_runtime_1 = require("react/jsx-runtime");
15
15
  var material_1 = require("@mui/material");
16
16
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
17
- var react_1 = require("react");
18
17
  var ItemsContainer = function (props) {
19
18
  return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%", position: "relative" }, props.sx), children: props.children }));
20
19
  };
21
20
  function Menu(props) {
22
21
  var theme = (0, ThemeProvider_1.useTheme)();
23
22
  var items = props.items;
24
- var itemsLength = (0, react_1.useMemo)(function () {
25
- return items === null || items === void 0 ? void 0 : items.length;
26
- }, [items]);
27
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ display: "grid", gridTemplateColumns: "repeat(".concat(itemsLength || 1, ", 1fr)"), paddingTop: theme.mixins.customPadding.p8, paddingBottom: theme.mixins.customPadding.p8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, border: "1px solid ".concat(theme.palette.border.accent3) }, props.sx), children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(ItemsContainer, { children: item }, index)); }) }));
23
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ display: "grid", paddingTop: theme.mixins.customPadding.p8, paddingBottom: theme.mixins.customPadding.p8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, border: "1px solid ".concat(theme.palette.border.accent3) }, props.sx), children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(ItemsContainer, { children: item }, index)); }) }));
28
24
  }
29
25
  exports.default = Menu;
@@ -105,21 +105,30 @@ var AssetView = function (props) {
105
105
  return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), pullToRefreshProps: {
106
106
  isPullable: !!isInitPasscode,
107
107
  onRefresh: handleRefresh,
108
- }, children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.mixins.gaps.g16 }, sx), children: [useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { items: [
108
+ }, children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.mixins.gaps.g16 }, sx), children: [useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { sx: {
109
+ gridTemplateColumns: "1fr 1px 1fr 1px 1fr",
110
+ }, items: [
109
111
  (0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
110
- borderRight: "1px solid ".concat(theme.palette.border.accent3),
111
112
  placeContent: "center",
112
113
  columnSpan: 1,
113
114
  }, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_RECEIVE", label: "Receive", sx: {
114
115
  width: "100%",
115
116
  } }) }) }, "receive"),
117
+ (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
118
+ width: "100%",
119
+ height: "100%",
120
+ backgroundColor: theme.palette.border.accent3,
121
+ } }, "divider-1"),
116
122
  (0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/external"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
117
- borderRight: "1px solid ".concat(theme.palette.border.accent3),
118
123
  placeContent: "center",
119
124
  columnSpan: 1,
120
125
  }, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_WITHDRAW_FC", label: "Withdraw", sx: { width: "100%" } }) }) }, "withdraw"),
126
+ (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
127
+ width: "100%",
128
+ height: "100%",
129
+ backgroundColor: theme.palette.border.accent3,
130
+ } }, "divider-2"),
121
131
  (0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/internal"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
122
- borderRight: "1px solid ".concat(theme.palette.border.accent3),
123
132
  placeContent: "center",
124
133
  columnSpan: 1,
125
134
  }, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_TRANSFER", label: "Transfer", sx: { width: "100%" } }) }) }, "send-internal"),
@@ -77,7 +77,7 @@ function Result(props) {
77
77
  var status = (0, react_1.useMemo)(function () { return (response === null || response === void 0 ? void 0 : response.transaction_status) || "failed"; }, [response === null || response === void 0 ? void 0 : response.transaction_status]);
78
78
  var recipientAddress = (0, react_1.useMemo)(function () { return (response === null || response === void 0 ? void 0 : response.to_address) || (payload === null || payload === void 0 ? void 0 : payload.to_address); }, [response === null || response === void 0 ? void 0 : response.to_address, payload === null || payload === void 0 ? void 0 : payload.to_address]);
79
79
  var amount = (0, react_1.useMemo)(function () { return (response === null || response === void 0 ? void 0 : response.amount) || (payload === null || payload === void 0 ? void 0 : payload.amount); }, [response === null || response === void 0 ? void 0 : response.amount, payload === null || payload === void 0 ? void 0 : payload.amount]);
80
- var message = (0, react_1.useMemo)(function () { return (response === null || response === void 0 ? void 0 : response.description) || (payload === null || payload === void 0 ? void 0 : payload.memo); }, [response === null || response === void 0 ? void 0 : response.description, payload === null || payload === void 0 ? void 0 : payload.memo]);
80
+ var memo = (0, react_1.useMemo)(function () { return (response === null || response === void 0 ? void 0 : response.description) || (payload === null || payload === void 0 ? void 0 : payload.memo); }, [response === null || response === void 0 ? void 0 : response.description, payload === null || payload === void 0 ? void 0 : payload.memo]);
81
81
  var feeInfo = (0, react_1.useMemo)(function () { return response === null || response === void 0 ? void 0 : response.fee_info; }, [response === null || response === void 0 ? void 0 : response.fee_info]);
82
82
  var dateCreated = (0, react_1.useMemo)(function () { return response === null || response === void 0 ? void 0 : response.date_created; }, [response === null || response === void 0 ? void 0 : response.date_created]);
83
83
  var tokenName = (0, react_1.useMemo)(function () { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.currency_data) === null || _a === void 0 ? void 0 : _a.name) || (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name); }, [(_a = response === null || response === void 0 ? void 0 : response.currency_data) === null || _a === void 0 ? void 0 : _a.name, selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name]);
@@ -123,11 +123,11 @@ function Result(props) {
123
123
  fontSize: "0.875rem",
124
124
  fontWeight: 500,
125
125
  color: "gray.700",
126
- }, 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
+ }, 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 }), memo && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Memo", titleStyle: {
127
127
  fontSize: "0.875rem",
128
128
  fontWeight: 500,
129
129
  color: "gray.700",
130
- }, 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
+ }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: memo }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
131
131
  fontSize: "0.875rem",
132
132
  fontWeight: 500,
133
133
  color: "gray.700",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.801",
3
+ "version": "0.0.804",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",