tek-wallet 0.0.153 → 0.0.154

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.
@@ -52,7 +52,7 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
52
52
  var theme = (0, material_1.useTheme)();
53
53
  var _a = (0, react_1.useState)(DepositStep.SELECT_TOKEN), currentStep = _a[0], setCurrentStep = _a[1];
54
54
  var _b = (0, react_1.useState)(), selectedToken = _b[0], setSelectedToken = _b[1];
55
- // const [selectedNetwork, setSelectedNetwork] = useState<any>()
55
+ var _c = (0, react_1.useState)(), selectedNetwork = _c[0], setSelectedNetwork = _c[1];
56
56
  var tokens = (0, useWalletData_1.default)().tokens;
57
57
  var open = function () {
58
58
  var _a;
@@ -82,15 +82,21 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
82
82
  nextStep();
83
83
  }
84
84
  };
85
+ var handleSelectNetwork = function (network) {
86
+ console.warn("network", selectedNetwork);
87
+ setSelectedNetwork(network);
88
+ nextStep();
89
+ };
85
90
  return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onClose: props.onClose, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: {
86
91
  width: "100%",
87
92
  paddingBottom: theme.mixins.customPadding.p16,
88
93
  display: "flex",
89
- }, overrideBack: handleBack, hideBack: currentStep === DepositStep.SELECT_TOKEN, center: DEPOSIT_STEP_NAME[currentStep], children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: { marginLeft: "auto" }, onClick: props.onClose }) }), onClose: close, children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, swiperProps: { autoHeight: true }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item) {
94
+ alignItems: "center",
95
+ }, overrideBack: handleBack, hideBack: currentStep === DepositStep.SELECT_TOKEN, center: DEPOSIT_STEP_NAME[currentStep], children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: { marginLeft: "auto" }, onClick: props.onClose }) }), onClose: close, children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, swiperProps: { autoHeight: true, spaceBetween: 32 }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item) {
90
96
  var stringifiedTokenData = JSON.stringify(__assign(__assign({}, item), { name: "Fake", fullname: "Fake fullname" }));
91
97
  return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { onClick: handleSelectToken, tokenData: stringifiedTokenData, active: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.id) != "kf" }, item.id));
92
98
  }) }) }, DepositStep.SELECT_TOKEN), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(function (item) {
93
- return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { networkData: JSON.stringify({
99
+ return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { onClick: handleSelectNetwork, networkData: JSON.stringify({
94
100
  name: "network ".concat(item),
95
101
  icon: "https://via.placeholder.com/150",
96
102
  }) }, item));
@@ -98,86 +104,23 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
98
104
  display: "flex",
99
105
  flexDirection: "column",
100
106
  gap: theme.mixins.gaps.g16,
101
- }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
102
- width: "100%",
103
- display: "flex",
104
- flexDirection: "column",
105
- gap: "0.75rem",
106
- backgroundColor: "ui-background-222",
107
- borderRadius: "0.75rem",
108
- padding: "1.5rem",
109
- alignItems: "flex-start",
110
- }, id: "share-deposit-info", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
111
- display: "flex",
112
- flexDirection: "column",
113
- gap: "0.125rem",
114
- color: "text.white",
115
- alignSelf: "center",
116
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
117
- fontSize: theme.typography.fontSize12,
118
- fontWeight: theme.typography.fontWeight500,
119
- leading: "typography.leading150",
120
- }, children: "Harry Andrew" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
121
- fontSize: theme.typography.fontSize12,
122
- fontWeight: theme.typography.fontWeight400,
123
- leading: "typography.leading150",
124
- }, children: "@user1234we" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
107
+ }, 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.black24, borderRadius: theme.mixins.theBorderRadius.r16, padding: theme.mixins.customPadding.p16, alignItems: "flex-start", backdropFilter: "blur(10px)" }), id: "share-deposit-info", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white", alignSelf: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: "Harry Andrew" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "@user1234we" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
125
108
  width: "fit-content",
126
109
  height: "fit-content",
127
110
  alignSelf: "center",
128
111
  borderRadius: theme.mixins.theBorderRadius.r12,
129
- }, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, {}) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
130
- display: "flex",
131
- flexDirection: "column",
132
- gap: "0.125rem",
133
- color: "text.white",
134
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
135
- fontSize: theme.typography.fontSize10,
136
- leading: "typography.leading150",
137
- }, children: "Network" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
138
- fontSize: theme.typography.fontSize13,
139
- fontWeight: theme.typography.fontWeight500,
140
- leading: "typography.leading150",
141
- }, children: "Ethereum (ERC20)" })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
142
- display: "flex",
143
- flexDirection: "column",
144
- gap: "0.125rem",
145
- color: "text.white",
146
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
147
- fontSize: theme.typography.fontSize10,
148
- leading: "typography.leading150",
149
- }, children: "Address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
150
- fontSize: theme.typography.fontSize13,
151
- fontWeight: theme.typography.fontWeight500,
152
- leading: "typography.leading150",
153
- wordBreak: "break-all",
154
- }, children: "tebfwe78w237dbyuc78wb4b3y8cbwebd8732w9bcubf638uegyg7dt63ged87dxi8w3gdyhf73" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
155
- display: "flex",
156
- alignItems: "center",
157
- gap: "8px",
158
- backgroundColor: "ui-background-white-16",
159
- borderRadius: "12px",
160
- padding: "8px 12px",
161
- }, children: (0, jsx_runtime_1.jsxs)(Text_1.default, { className: "text-11 text-ui-text-white leading-140", children: ["Deposit min ", (0, jsx_runtime_1.jsx)("strong", { children: "0.001" }), " ETH and select the correct network, ", "or you'll lose your assets."] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
162
- display: "flex",
163
- alignItems: "center",
164
- gap: "0.75rem",
165
- justifyContent: "center",
166
- }, children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: "https://reactjs.org/", children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { className: "gap-1.5 flex items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
112
+ overflow: "hidden",
113
+ }, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, {}) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: "Ethereum (ERC20)" })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all" }), children: "tebfwe78w237dbyuc78wb4b3y8cbwebd8732w9bcubf638uegyg7dt63ged87dxi8w3gdyhf73" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, backgroundColor: theme.palette.background.white16, borderRadius: theme.mixins.theBorderRadius.r12, padding: theme.mixins.customPadding.p8 }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: ["Deposit min ", (0, jsx_runtime_1.jsx)("strong", { children: "0.001" }), " ETH and select the correct network, ", "or you'll lose your assets."] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: "https://reactjs.org/", children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { className: "gap-1.5 flex items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
167
114
  fontSize: theme.typography.fontSize12,
168
115
  fontWeight: theme.typography.fontWeight400,
169
116
  leading: "typography.leading150",
170
117
  textTransform: "capitalize",
171
- }, children: "Copy" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) }), (0, jsx_runtime_1.jsx)(Share_1.default, { elementId: "share-deposit-info", children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { sx: {
172
- gap: "0.125rem",
173
- display: "flex",
174
- alignItems: "center",
175
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
118
+ }, children: "Copy" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) }), (0, jsx_runtime_1.jsx)(Share_1.default, { elementId: "share-deposit-info", children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { sx: __assign({ gap: theme.mixins.gaps.g4 }, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
176
119
  fontSize: theme.typography.fontSize12,
177
120
  fontWeight: theme.typography.fontWeight400,
178
121
  leading: "typography.leading150",
179
122
  textTransform: "capitalize",
180
- }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) })] })] }) }, DepositStep.SHOW_QR_CODE)] }, tokens === null || tokens === void 0 ? void 0 : tokens.length) }) }));
123
+ }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("share"), width: 20 })] }) })] })] }) }, DepositStep.SHOW_QR_CODE)] }, tokens === null || tokens === void 0 ? void 0 : tokens.length) }) }));
181
124
  });
182
125
  DepositFunction.displayName = "DepositFunction";
183
126
  exports.default = DepositFunction;
@@ -4,27 +4,13 @@ var jsx_runtime_1 = require("react/jsx-runtime");
4
4
  var qrcode_react_1 = require("qrcode.react");
5
5
  // import getIcon from "../../../utils/getIcon";
6
6
  function QRCode() {
7
- return (
8
- // <QRCodeCanvas
9
- // className=""
10
- // value="https://reactjs.org/"
11
- // size={160}
12
- // imageSettings={{
13
- // src: getIcon("eth"),
14
- // x: undefined,
15
- // y: undefined,
16
- // height: 32,
17
- // width: 32,
18
- // excavate: true,
19
- // }}
20
- // />
21
- (0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: "https://picturesofpeoplescanningqrcodes.tumblr.com/", title: "Title for my QR Code", size: 128, bgColor: "#ffffff", fgColor: "#000000", level: "H", minVersion: 8, marginSize: 2, imageSettings: {
7
+ return ((0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: "https://picturesofpeoplescanningqrcodes.tumblr.com/", title: "Title for my QR Code", size: 128, bgColor: "#ffffff", fgColor: "#000000", level: "H", minVersion: 8, marginSize: 6, imageSettings: {
22
8
  src: "https://static.zpao.com/favicon.png",
23
9
  x: undefined,
24
10
  y: undefined,
25
11
  height: 24,
26
12
  width: 24,
27
- opacity: 1.2,
13
+ opacity: 1,
28
14
  excavate: true,
29
15
  } }));
30
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.153",
3
+ "version": "0.0.154",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",