tek-wallet 0.0.107 → 0.0.108

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.
@@ -68,9 +68,10 @@ var GetSeedPhraseWalletViewStep;
68
68
  var passcodeLength = 6;
69
69
  var GetSeedPhraseWalletView = function (props) {
70
70
  var _a = (0, react_2.useState)(""), otp = _a[0], setOtp = _a[1];
71
+ var _b = (0, react_2.useState)(undefined), seedPhrase = _b[0], setSeedPhrase = _b[1];
71
72
  var swiperControlledRef = (0, react_2.useRef)(null);
72
73
  var childPageLayoutRef = (0, react_2.useRef)(null);
73
- var _b = (0, react_2.useState)(GetSeedPhraseWalletViewStep.ENTER_PASSCODE), currentStep = _b[0], setCurrentStep = _b[1];
74
+ var _c = (0, react_2.useState)(GetSeedPhraseWalletViewStep.ENTER_PASSCODE), currentStep = _c[0], setCurrentStep = _c[1];
74
75
  var getSeedPhrase = (0, useWalletData_1.default)().getSeedPhrase;
75
76
  var gotoStep = function (step) {
76
77
  var _a;
@@ -112,9 +113,15 @@ var GetSeedPhraseWalletView = function (props) {
112
113
  }, function () {
113
114
  var _a;
114
115
  (_a = childPageLayoutRef.current) === null || _a === void 0 ? void 0 : _a.showLoading();
115
- }, function () {
116
- var _a;
117
- (_a = childPageLayoutRef.current) === null || _a === void 0 ? void 0 : _a.showSuccess();
116
+ }, function (data) {
117
+ var _a, _b;
118
+ setSeedPhrase((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.seed_pharse);
119
+ (_b = childPageLayoutRef.current) === null || _b === void 0 ? void 0 : _b.showSuccess();
120
+ setTimeout(function () {
121
+ var _a;
122
+ (_a = childPageLayoutRef.current) === null || _a === void 0 ? void 0 : _a.showNormal();
123
+ gotoStep(GetSeedPhraseWalletViewStep.SHOW_SEED_PHRASE);
124
+ }, 1000);
118
125
  }, handleCreateWalletError);
119
126
  console.warn("🚀 ~ handleOtpChange ~ response:", response);
120
127
  }
@@ -136,12 +143,19 @@ var GetSeedPhraseWalletView = function (props) {
136
143
  fontSize: "14px",
137
144
  textAlign: "center",
138
145
  }, children: "Enter your passcode to get your wallet seed phrase" })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
139
- display: "flex",
140
- flexDirection: "column",
141
- alignItems: "center",
142
- justifyContent: "center",
143
- height: "100%",
146
+ display: "grid",
147
+ gridTemplateColumns: "1fr 1fr",
144
148
  gap: "1rem",
145
- } }) })] }) }) }));
149
+ }, children: seedPhrase === null || seedPhrase === void 0 ? void 0 : seedPhrase.split(" ").map(function (word, index) { return ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
150
+ color: "text.white",
151
+ padding: "0.5rem 0.75rem",
152
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
153
+ borderRadius: "0.5rem",
154
+ fontSize: "14px",
155
+ fontWeight: "400",
156
+ textAlign: "center",
157
+ width: "100%",
158
+ border: "1px solid rgba(255, 255, 255, 0.2)",
159
+ }, children: word }, index)); }) }) })] }) }) }));
146
160
  };
147
161
  exports.default = GetSeedPhraseWalletView;
@@ -143,9 +143,12 @@ export interface GetSeedPhraseServiceBody {
143
143
  export interface GetSeedPhraseServiceResponse {
144
144
  success: boolean;
145
145
  message: string;
146
- data: string;
146
+ data: GetSeedPhraseServiceData;
147
147
  timestamp: string;
148
148
  }
149
+ export interface GetSeedPhraseServiceData {
150
+ seed_pharse: string;
151
+ }
149
152
  export interface ImportWalletServiceBody {
150
153
  seed_pharse: string;
151
154
  app_slugs: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",