tek-wallet 0.0.768 → 0.0.770

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.
Files changed (24) hide show
  1. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +1 -1
  2. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +6 -2
  3. package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +1 -1
  4. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +2 -2
  5. package/dist/components/TekWallet/components/ui/DetailSwap/index.js +1 -1
  6. package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +11 -12
  7. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +6 -4
  8. package/dist/components/TekWallet/components/ui/ScanQRToSend/index.js +1 -1
  9. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +19 -9
  10. package/dist/components/TekWallet/components/views/ActivityView/index.js +1 -1
  11. package/dist/components/TekWallet/components/views/AssetView/index.js +1 -1
  12. package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +7 -5
  13. package/dist/components/TekWallet/components/views/DetailActivityView/index.js +5 -4
  14. package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +5 -5
  15. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +5 -5
  16. package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +3 -3
  17. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +3 -3
  18. package/dist/components/TekWallet/components/views/SettingView/index.js +1 -1
  19. package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +1 -1
  20. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +4 -2
  21. package/dist/components/TekWallet/providers/TekWalletProvider/index.js +5 -5
  22. package/dist/components/TekWallet/services/axios/get-activities-service/type.d.ts +1 -0
  23. package/package.json +1 -1
  24. package/dist/components/TekWallet/components/ui/QrCodeReader/reader.json +0 -2644
@@ -39,7 +39,7 @@ function ActivitiesTypeSlice(props) {
39
39
  var theme = (0, ThemeProvider_1.useTheme)();
40
40
  var _c = (0, useActivities_1.default)(), activities = _c.activities, loadActivities = _c.loadActivities, loadOutActivityType = _c.loadOutActivityType;
41
41
  var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx, smartListProps = props.smartListProps;
42
- var options = (0, TekWalletProvider_1.useWalletConfig)().options;
42
+ var options = (0, TekWalletProvider_1.useWalletSetup)().options;
43
43
  var basePath = (options || {}).basePath;
44
44
  var activitiesByType = (0, react_1.useMemo)(function () {
45
45
  if (!(type === null || type === void 0 ? void 0 : type.slug))
@@ -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;
@@ -64,7 +64,7 @@ var TekWalletView_1 = require("../../views/TekWalletView");
64
64
  var Icon_1 = __importDefault(require("../Icon"));
65
65
  var AssetViewHeader = function () {
66
66
  var _a = (0, useWallet_1.default)(), masterWallet = _a.masterWallet, blockchainWallets = _a.blockchainWallets;
67
- var options = (0, TekWalletProvider_1.useWalletConfig)().options;
67
+ var options = (0, TekWalletProvider_1.useWalletSetup)().options;
68
68
  var theme = (0, ThemeProvider_1.useTheme)();
69
69
  var modalRef = (0, react_1.useRef)(null);
70
70
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "center", position: "relative", boxShadow: "0 0 1px 2px rgba(0, 0, 0, 0.03)" }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: modalRef, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "center", justifyContent: "center", textAlign: "center", gap: theme.mixins.gaps.g4, py: theme.mixins.customPadding.p8 }), theme.mixins.value), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.25rem", height: "1.25rem" }, children: SvgPath_1.WALLET }), (0, compactWalletAddress_1.default)(masterWallet), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "0.625rem", height: "0.625rem" }, children: SvgPath_1.ARROW_DROP_DOWN })] }), direction: DrawerComponent_1.DRAWER_DIRECTION.TOP, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
@@ -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,
@@ -12,8 +12,6 @@ var AppBackDrop_1 = __importDefault(require("../AppBackDrop"));
12
12
  var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
13
13
  var PageHeader_1 = __importDefault(require("../PageHeader"));
14
14
  var providers_1 = require("../../../providers");
15
- var lottie_react_1 = __importDefault(require("lottie-react"));
16
- var reader_json_1 = __importDefault(require("./reader.json"));
17
15
  var STYLES = {
18
16
  borderWidth: "4px",
19
17
  borderColor: "#ffffff",
@@ -82,18 +80,19 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
82
80
  }, [isOpen]);
83
81
  (0, react_1.useLayoutEffect)(function () {
84
82
  var styleTag = document.createElement("style");
85
- styleTag.innerHTML = "\n @keyframes move-up-down {\n 0% {\n transform: translateY(0%);\n }\n 50% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(0%);\n }\n }\n\n .move-up-down-animation {\n animation: move-up-down 5s infinite linear;\n }\n ";
83
+ styleTag.innerHTML = "\n @keyframes move-up-down {\n 0% {\n transform: translateY(0%);\n }\n 50% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(0%);\n }\n }\n\n .move-up-down-animation {\n animation: move-up-down 4s infinite linear;\n }\n ";
86
84
  document.head.appendChild(styleTag);
87
85
  return function () {
88
86
  styleTag.remove();
89
87
  };
90
88
  }, []);
91
89
  var theme = (0, providers_1.useTheme)();
90
+ var topOffset = (0, providers_1.useWalletSetup)().topOffset;
92
91
  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: {
93
92
  backgroundColor: "transparent !important",
94
93
  }, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
95
94
  position: "absolute",
96
- top: 0,
95
+ top: topOffset || 0,
97
96
  left: 0,
98
97
  right: 0,
99
98
  zIndex: 1001,
@@ -118,14 +117,14 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
118
117
  transform: "translateX(-50%) translateY(-50%)",
119
118
  boxShadow: "0 0 2px max(50vw, 50dvh) rgba(0, 0, 0, 0.36)",
120
119
  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: {
120
+ }, children: [(0, jsx_runtime_1.jsx)("div", { className: "move-up-down-animation", style: {
121
+ position: "absolute",
122
+ left: 0,
123
+ top: 0,
124
+ width: "100%",
125
+ height: "100%",
126
+ borderTop: "2px solid currentColor",
127
+ } }), (0, jsx_runtime_1.jsx)("div", { style: {
129
128
  position: "absolute",
130
129
  borderTopLeftRadius: STYLES.borderRadius,
131
130
  top: "-".concat(STYLES.borderWidth),
@@ -443,13 +443,13 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
443
443
  height: "1rem",
444
444
  width: "1px",
445
445
  backgroundColor: theme.palette.border.accent3,
446
- } }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20, display: "block" }, onClick: handleGotoHistory, children: SvgPath_1.IC_HISTORY })] }))] })) }), footer: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
446
+ } }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20, display: "block" }, onClick: handleGotoHistory, children: SvgPath_1.IC_HISTORY })] }))] })) }), footer: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
447
447
  maxHeight: currentStep === ReceiveStep.SHOW_QR_CODE ? "120px" : 0,
448
448
  overflow: "hidden",
449
449
  transition: currentStep === ReceiveStep.SHOW_QR_CODE
450
450
  ? "max-height 0.3s linear 0.3s"
451
451
  : "max-height 0s linear",
452
- }, children: (0, jsx_runtime_1.jsx)(Share_1.default, { elementId: "share-receive-info", onProgress: handleShareProgress, onFinish: handleShareFinish, imageName: sharedImageName, children: (0, jsx_runtime_1.jsx)(BottomActionLayout_1.default, { children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { fullWidth: true, status: isSharing ? Button_1.BUTTON_STATUS.LOADING : undefined, children: "Share" }) }) }) }), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: stepSwiperRef, swiperProps: {
452
+ }, children: [false && ((0, jsx_runtime_1.jsx)(Share_1.default, { elementId: "share-receive-info", onProgress: handleShareProgress, onFinish: handleShareFinish, imageName: sharedImageName, children: (0, jsx_runtime_1.jsx)(BottomActionLayout_1.default, { children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { fullWidth: true, status: isSharing ? Button_1.BUTTON_STATUS.LOADING : undefined, children: "Share" }) }) })), (0, jsx_runtime_1.jsx)(BottomActionLayout_1.default, { children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: close, fullWidth: true, children: "Done" }) })] }), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: stepSwiperRef, swiperProps: {
453
453
  spaceBetween: 32,
454
454
  }, disableSwipe: true, initialActiveTab: currentStep - 1, sx: {
455
455
  height: "100%",
@@ -505,7 +505,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
505
505
  fontWeight: theme.typography.fontWeight600,
506
506
  fontSize: theme.typography.fontSize10,
507
507
  lineHeight: "100%",
508
- }, children: "Learn more" }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "How to choose my top up network", onClose: closeChooseNetworkSupport, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.listDescription), { color: theme.palette.text.blackContrast }), children: "Lorem ipsum dolor sit amet consectetur. Vitae faucibus ornare lectus arcu sit sed et. Eu integer pharetra posuere lobortis varius dapibus risus. Pellentesque quis id diam ante lectus ornare tristique." }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.listDescription), { color: theme.palette.text.blackContrast }), children: "Eget viverra quis facilisis velit mattis. Risus sed egestas vitae ridiculus odio sit eu adipiscing. Scelerisque nunc nec nisl mauris venenatis viverra est dictumst adipiscing." }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.listDescription), { color: theme.palette.text.blackContrast }), children: "Id pulvinar aliquam quam ut sed ut pharetra turpis ipsum. Condimentum eget a interdum neque sagittis lobortis proin nisi. Magna id massa risus elit at." })] }) }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 6, height: 6, mt: "4px" }, children: (0, jsx_runtime_1.jsx)("svg", { width: "4", height: "6", viewBox: "0 0 4 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.7 3L0.7 6L0 5.3L2.3 3L0 0.7L0.7 0L3.7 3Z", fill: "#044C2F" }) }) })] })] })), networks === null || networks === void 0 ? void 0 : networks.map(function (item, index) {
508
+ }, children: "Learn more" }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "How to choose my top up network?", onClose: closeChooseNetworkSupport, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.listDescription), { color: theme.palette.text.blackContrast }), children: "When top up, choose the same network as the one used on the sending platform. For example, if transferring funds using BSC network, select BSC for top up. Otherwise, you may risk losing your assets." }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.listDescription), { color: theme.palette.text.blackContrast }), children: "If unsure, test with a small amount and confirm it arrives safely before top up the rest." })] }) }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 6, height: 6, mt: "4px" }, children: (0, jsx_runtime_1.jsx)("svg", { width: "4", height: "6", viewBox: "0 0 4 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.7 3L0.7 6L0 5.3L2.3 3L0 0.7L0.7 0L3.7 3Z", fill: "#044C2F" }) }) })] })] })), networks === null || networks === void 0 ? void 0 : networks.map(function (item, index) {
509
509
  if (!item)
510
510
  return null;
511
511
  return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { onClick: handleSelectNetwork, networkData: JSON.stringify(item), active: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.id) === item.id, token: selectedToken }, "network_".concat(item.id, "_").concat(index)));
@@ -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: {
@@ -70,7 +70,7 @@ var providers_1 = require("../../../providers");
70
70
  var TekWalletView_1 = require("../../views/TekWalletView");
71
71
  exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
72
72
  var children = props.children, transferInternalPath = props.transferInternalPath, transferExternalPath = props.transferExternalPath, gotoTransferInternalOverride = props.gotoTransferInternalOverride, gotoTransferExternalOverride = props.gotoTransferExternalOverride, sx = props.sx, className = props.className;
73
- var options = (0, providers_1.useWalletConfig)().options;
73
+ var options = (0, providers_1.useWalletSetup)().options;
74
74
  var internalPath = transferInternalPath ||
75
75
  "".concat((options === null || options === void 0 ? void 0 : options.basePath) || "", "/tek-wallet/").concat(TekWalletView_1.TekWalletViewRoutes.SEND_INTERNAL);
76
76
  var externalPath = transferExternalPath ||
@@ -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: {
@@ -19,7 +19,7 @@ var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
19
19
  var ActivityView = function (props) {
20
20
  var sx = props.sx;
21
21
  var theme = (0, ThemeProvider_1.useTheme)();
22
- var options = (0, TekWalletProvider_1.useWalletConfig)().options;
22
+ var options = (0, TekWalletProvider_1.useWalletSetup)().options;
23
23
  var hideBackButtons = (options || {}).hideBackButtons;
24
24
  var swiperRef = (0, react_1.useRef)(null);
25
25
  var activityTypes = (0, useActivities_1.default)().activityTypes;
@@ -54,7 +54,7 @@ var AssetView = function (props) {
54
54
  var sx = props.sx, rest = __rest(props, ["sx"]);
55
55
  var _a = (0, useWalletData_1.default)(), isInitPasscode = _a.isInitPasscode, masterWallet = _a.masterWallet;
56
56
  var theme = (0, ThemeProvider_1.useTheme)();
57
- var options = (0, TekWalletProvider_1.useWalletConfig)().options;
57
+ var options = (0, TekWalletProvider_1.useWalletSetup)().options;
58
58
  var _b = options || {}, hideActivitySectionInAssetView = _b.hideActivitySectionInAssetView, useBasicAmountGroupInAssetView = _b.useBasicAmountGroupInAssetView, basePath = _b.basePath;
59
59
  var router = (0, useCustomRouter_1.default)();
60
60
  var idPrefix = (0, xhub_keyboard_1.useUniqueId)();
@@ -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: {
@@ -65,7 +65,7 @@ var SettingView = function (props) {
65
65
  var _a = props;
66
66
  var _b = (0, react_1.useState)(Button_1.BUTTON_STATUS.ENABLED), buttonStatus = _b[0], setButtonStatus = _b[1];
67
67
  var theme = (0, providers_1.useTheme)();
68
- var onLogout = (0, TekWalletProvider_1.useWalletConfig)().onLogout;
68
+ var onLogout = (0, TekWalletProvider_1.useWalletSetup)().onLogout;
69
69
  var handleLogout = function () {
70
70
  if (!onLogout)
71
71
  return;
@@ -28,7 +28,7 @@ function EventHandlerProvider(props) {
28
28
  var _a = (0, useEventHandler_1.useEventHandler)(), transactionHandler = _a.transactionHandler, walletInfoHandler = _a.walletInfoHandler;
29
29
  var _b = (0, useRealtime_1.default)(), pushNotification = _b.pushNotification, transaction = _b.transaction, walletHandlerInfo = _b.walletHandlerInfo;
30
30
  var router = (0, useCustomRouter_1.default)();
31
- var options = (0, TekWalletProvider_1.useWalletConfig)().options;
31
+ var options = (0, TekWalletProvider_1.useWalletSetup)().options;
32
32
  (0, react_1.useEffect)(function () {
33
33
  router.prefetch("".concat(options === null || options === void 0 ? void 0 : options.basePath, "/tek-wallet/activities/abc"));
34
34
  }, [router, options === null || options === void 0 ? void 0 : options.basePath]);
@@ -18,13 +18,15 @@ export interface TekWalletProviderProps {
18
18
  accessToken?: string;
19
19
  options?: Options;
20
20
  onLogout?: () => void;
21
+ topOffset?: number;
21
22
  }
22
23
  export interface TekWalletContextType {
23
24
  isSSO: boolean | undefined;
24
25
  options?: Options;
25
26
  onLogout?: () => void;
27
+ topOffset?: number;
26
28
  }
27
29
  export declare const TekWalletContext: import("react").Context<TekWalletContextType>;
28
- export declare function TekWalletProvider({ children, isSSO, accessToken, options, onLogout, }: TekWalletProviderProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function TekWalletProvider({ children, isSSO, accessToken, options, topOffset, onLogout, }: TekWalletProviderProps): import("react/jsx-runtime").JSX.Element;
29
31
  export default TekWalletProvider;
30
- export declare const useWalletConfig: () => TekWalletContextType;
32
+ export declare const useWalletSetup: () => TekWalletContextType;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.useWalletConfig = exports.TekWalletContext = exports.Views = void 0;
7
+ exports.useWalletSetup = exports.TekWalletContext = exports.Views = void 0;
8
8
  exports.TekWalletProvider = TekWalletProvider;
9
9
  var jsx_runtime_1 = require("react/jsx-runtime");
10
10
  var react_1 = require("react");
@@ -30,17 +30,17 @@ var initialTekWalletContext = {
30
30
  };
31
31
  exports.TekWalletContext = (0, react_1.createContext)(initialTekWalletContext);
32
32
  function TekWalletProvider(_a) {
33
- var children = _a.children, isSSO = _a.isSSO, accessToken = _a.accessToken, options = _a.options, onLogout = _a.onLogout;
33
+ var children = _a.children, isSSO = _a.isSSO, accessToken = _a.accessToken, options = _a.options, topOffset = _a.topOffset, onLogout = _a.onLogout;
34
34
  var WalletProvider = isSSO ? WalletDataProviderNoImport_1.default : WalletDataProvider_1.default;
35
35
  var _b = (0, react_1.useState)("1"), resetTrigger = _b[0], setResetTrigger = _b[1];
36
36
  var onDisconnect = function () {
37
37
  setResetTrigger(function (prev) { return prev + "1"; });
38
38
  };
39
- return ((0, jsx_runtime_1.jsx)(exports.TekWalletContext.Provider, { value: { isSSO: isSSO, options: options, onLogout: onLogout }, children: (0, jsx_runtime_1.jsx)(WalletProvider, { accessToken: accessToken !== null && accessToken !== void 0 ? accessToken : "", onDisconnect: onDisconnect, children: (0, jsx_runtime_1.jsx)(ThemeProvider_1.CustomThemeProvider, { children: (0, jsx_runtime_1.jsx)(RealtimeProvider_1.default, { options: options, children: (0, jsx_runtime_1.jsx)(ActivitiesProvider_1.default, { children: (0, jsx_runtime_1.jsx)(ReceiveProvider_1.default, { children: (0, jsx_runtime_1.jsx)(LockTokenProvider_1.default, { children: (0, jsx_runtime_1.jsx)(WithdrawProvider_1.default, { children: (0, jsx_runtime_1.jsx)(SwapProvider_1.default, { children: (0, jsx_runtime_1.jsx)(EventHandlerProvider_1.default, { options: options, children: children }) }) }) }) }) }) }) }) }, resetTrigger) }));
39
+ return ((0, jsx_runtime_1.jsx)(exports.TekWalletContext.Provider, { value: { isSSO: isSSO, options: options, onLogout: onLogout, topOffset: topOffset }, children: (0, jsx_runtime_1.jsx)(WalletProvider, { accessToken: accessToken !== null && accessToken !== void 0 ? accessToken : "", onDisconnect: onDisconnect, children: (0, jsx_runtime_1.jsx)(ThemeProvider_1.CustomThemeProvider, { children: (0, jsx_runtime_1.jsx)(RealtimeProvider_1.default, { options: options, children: (0, jsx_runtime_1.jsx)(ActivitiesProvider_1.default, { children: (0, jsx_runtime_1.jsx)(ReceiveProvider_1.default, { children: (0, jsx_runtime_1.jsx)(LockTokenProvider_1.default, { children: (0, jsx_runtime_1.jsx)(WithdrawProvider_1.default, { children: (0, jsx_runtime_1.jsx)(SwapProvider_1.default, { children: (0, jsx_runtime_1.jsx)(EventHandlerProvider_1.default, { options: options, children: children }) }) }) }) }) }) }) }) }, resetTrigger) }));
40
40
  }
41
41
  exports.default = TekWalletProvider;
42
- var useWalletConfig = function () {
42
+ var useWalletSetup = function () {
43
43
  var config = (0, react_1.useContext)(exports.TekWalletContext);
44
44
  return config;
45
45
  };
46
- exports.useWalletConfig = useWalletConfig;
46
+ exports.useWalletSetup = useWalletSetup;
@@ -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.770",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",