@matchain/matchid-sdk-react 0.1.37-alpha.10 → 0.1.37-alpha.12

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.
@@ -4,7 +4,7 @@ import {
4
4
  useMatchEvents,
5
5
  useUserInfo,
6
6
  useWallet
7
- } from "../chunk-35YNZM5K.mjs";
7
+ } from "../chunk-F5CJROWH.mjs";
8
8
  import "../chunk-6PWH7WZI.mjs";
9
9
  import "../chunk-J5LGTIGS.mjs";
10
10
  export {
package/dist/index.js CHANGED
@@ -2037,14 +2037,9 @@ function PasswordModal({
2037
2037
  return "";
2038
2038
  }, [rePassword, password]);
2039
2039
  (0, import_react6.useEffect)(() => {
2040
- if (isOpen && overview) {
2040
+ if (isOpen) {
2041
2041
  setPassword("");
2042
2042
  setRePassword("");
2043
- const did2 = overview.did.split(":")[2];
2044
- initWallet({
2045
- did: did2,
2046
- address: ""
2047
- });
2048
2043
  }
2049
2044
  }, [isOpen, overview]);
2050
2045
  const [isSubmitting, setIsSubmitting] = (0, import_react6.useState)(false);
@@ -2052,8 +2047,13 @@ function PasswordModal({
2052
2047
  if (isSubmitting) return;
2053
2048
  try {
2054
2049
  setIsSubmitting(true);
2050
+ const did2 = overview ? overview.did.split(":")[2] : "";
2051
+ await initWallet({
2052
+ did: did2,
2053
+ address: ""
2054
+ });
2055
2055
  const address = await generateWallet({
2056
- did: did.split(":")[2],
2056
+ did: did2.split(":")[2],
2057
2057
  userPasscode: password
2058
2058
  });
2059
2059
  await refreshOverview();
@@ -2139,11 +2139,6 @@ function RecoveryModal({
2139
2139
  (0, import_react7.useEffect)(() => {
2140
2140
  if (isOpen && overview) {
2141
2141
  setPassword("");
2142
- const did = overview.did.split(":")[2];
2143
- initWallet({
2144
- did,
2145
- address: overview.address
2146
- });
2147
2142
  }
2148
2143
  }, [isOpen, overview]);
2149
2144
  const [isSubmitting, setIsSubmitting] = (0, import_react7.useState)(false);
@@ -2151,6 +2146,11 @@ function RecoveryModal({
2151
2146
  if (isSubmitting) return;
2152
2147
  try {
2153
2148
  setIsSubmitting(true);
2149
+ const did = overview ? overview.did.split(":")[2] : "";
2150
+ await initWallet({
2151
+ did,
2152
+ address: overview?.address || ""
2153
+ });
2154
2154
  await recoveryWallet("ethereum", "user_passcode_recovery_key", password);
2155
2155
  await refreshOverview();
2156
2156
  onSuccess && onSuccess();
@@ -2976,7 +2976,7 @@ function UsernameModal({
2976
2976
  }, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_intl10.FormattedMessage, { id: "confirm" }) }),
2977
2977
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { style: {
2978
2978
  marginTop: isDownMd ? "12px" : "24px"
2979
- }, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_intl10.FormattedMessage, { id: "nextTime" }) })
2979
+ }, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_intl10.FormattedMessage, { id: "cancel" }) })
2980
2980
  ] }) });
2981
2981
  }
2982
2982
 
@@ -4336,7 +4336,8 @@ var en_default = {
4336
4336
  CEXBindTips3: "3. Only one API can be bound to the same exchange at the same time.",
4337
4337
  CEXBindApiKey: "API Key",
4338
4338
  CEXBindApiSecretKey: "API Secret Key",
4339
- CEXBindApiPassphrase: "API Passphrase"
4339
+ CEXBindApiPassphrase: "API Passphrase",
4340
+ cancel: "Cancel"
4340
4341
  };
4341
4342
 
4342
4343
  // src/i18n/zh.json
@@ -4386,7 +4387,8 @@ var zh_default = {
4386
4387
  CEXBindTips3: "3. \u540C\u4E00\u65F6\u95F4\u53EA\u80FD\u7ED1\u5B9A\u4E00\u4E2A API \u5230\u76F8\u540C\u7684\u4EA4\u6613\u6240\u3002",
4387
4388
  CEXBindApiKey: "API \u5BC6\u94A5",
4388
4389
  CEXBindApiSecretKey: "API \u79D8\u94A5",
4389
- CEXBindApiPassphrase: "API \u5BC6\u7801\u77ED\u8BED"
4390
+ CEXBindApiPassphrase: "API \u5BC6\u7801\u77ED\u8BED",
4391
+ cancel: "\u53D6\u6D88"
4390
4392
  };
4391
4393
 
4392
4394
  // src/i18n/tw.json
@@ -4436,7 +4438,8 @@ var tw_default = {
4436
4438
  CEXBindTips3: "3. \u540C\u4E00\u6642\u9593\u53EA\u80FD\u7D81\u5B9A\u4E00\u500B API \u5230\u76F8\u540C\u7684\u4EA4\u6613\u6240\u3002",
4437
4439
  CEXBindApiKey: "API \u91D1\u9470",
4438
4440
  CEXBindApiSecretKey: "API \u5BC6\u9470",
4439
- CEXBindApiPassphrase: "API \u5BC6\u78BC\u77ED\u8A9E"
4441
+ CEXBindApiPassphrase: "API \u5BC6\u78BC\u77ED\u8A9E",
4442
+ cancel: "\u53D6\u6D88"
4440
4443
  };
4441
4444
 
4442
4445
  // src/i18n/fr.json
@@ -4486,7 +4489,8 @@ var fr_default = {
4486
4489
  CEXBindTips3: "3. Une seule API peut \xEAtre li\xE9e au m\xEAme \xE9change \xE0 la fois.",
4487
4490
  CEXBindApiKey: "Cl\xE9 API",
4488
4491
  CEXBindApiSecretKey: "Cl\xE9 Secr\xE8te API",
4489
- CEXBindApiPassphrase: "Phrase secr\xE8te API"
4492
+ CEXBindApiPassphrase: "Phrase secr\xE8te API",
4493
+ cancel: "Annuler"
4490
4494
  };
4491
4495
 
4492
4496
  // src/i18n/ja.json
@@ -4536,7 +4540,8 @@ var ja_default = {
4536
4540
  CEXBindTips3: "3. \u540C\u3058\u53D6\u5F15\u6240\u306B\u540C\u6642\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u308B API \u306F1\u3064\u3060\u3051\u3067\u3059\u3002",
4537
4541
  CEXBindApiKey: "API \u30AD\u30FC",
4538
4542
  CEXBindApiSecretKey: "API \u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u30AD\u30FC",
4539
- CEXBindApiPassphrase: "API \u30D1\u30B9\u30D5\u30EC\u30FC\u30BA"
4543
+ CEXBindApiPassphrase: "API \u30D1\u30B9\u30D5\u30EC\u30FC\u30BA",
4544
+ cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB"
4540
4545
  };
4541
4546
 
4542
4547
  // src/i18n/ko.json
@@ -4586,7 +4591,8 @@ var ko_default = {
4586
4591
  CEXBindTips3: "3. \uB3D9\uC77C\uD55C \uAC70\uB798\uC18C\uC5D0 \uB3D9\uC2DC\uC5D0 \uC5F0\uACB0\uD560 \uC218 \uC788\uB294 API\uB294 \uD558\uB098\uBFD0\uC785\uB2C8\uB2E4.",
4587
4592
  CEXBindApiKey: "API \uD0A4",
4588
4593
  CEXBindApiSecretKey: "API \uBE44\uBC00 \uD0A4",
4589
- CEXBindApiPassphrase: "API \uC554\uD638 \uAD6C\uBB38"
4594
+ CEXBindApiPassphrase: "API \uC554\uD638 \uAD6C\uBB38",
4595
+ cancel: "\uCDE8\uC18C"
4590
4596
  };
4591
4597
 
4592
4598
  // src/i18n/vi.json
@@ -4636,7 +4642,8 @@ var vi_default = {
4636
4642
  CEXBindTips3: "3. Ch\u1EC9 c\xF3 th\u1EC3 li\xEAn k\u1EBFt m\u1ED9t API v\u1EDBi c\xF9ng m\u1ED9t s\xE0n giao d\u1ECBch t\u1EA1i m\u1ED9t th\u1EDDi \u0111i\u1EC3m.",
4637
4643
  CEXBindApiKey: "Kh\xF3a API",
4638
4644
  CEXBindApiSecretKey: "Kh\xF3a b\xED m\u1EADt API",
4639
- CEXBindApiPassphrase: "C\u1EE5m m\u1EADt kh\u1EA9u API"
4645
+ CEXBindApiPassphrase: "C\u1EE5m m\u1EADt kh\u1EA9u API",
4646
+ cancel: "H\u1EE7y"
4640
4647
  };
4641
4648
 
4642
4649
  // src/i18n/es.json
@@ -4686,7 +4693,8 @@ var es_default = {
4686
4693
  CEXBindTips3: "3. Solo se puede vincular una API al mismo intercambio a la vez.",
4687
4694
  CEXBindApiKey: "Clave API",
4688
4695
  CEXBindApiSecretKey: "Clave Secreta API",
4689
- CEXBindApiPassphrase: "Frase de contrase\xF1a API"
4696
+ CEXBindApiPassphrase: "Frase de contrase\xF1a API",
4697
+ cancel: "Cancelar"
4690
4698
  };
4691
4699
 
4692
4700
  // src/i18n/pt.json
@@ -4736,7 +4744,8 @@ var pt_default = {
4736
4744
  CEXBindTips3: "3. Apenas uma API pode ser vinculada ao mesmo c\xE2mbio ao mesmo tempo.",
4737
4745
  CEXBindApiKey: "Chave API",
4738
4746
  CEXBindApiSecretKey: "Chave Secreta API",
4739
- CEXBindApiPassphrase: "Senha de API"
4747
+ CEXBindApiPassphrase: "Senha de API",
4748
+ cancel: "Cancelar"
4740
4749
  };
4741
4750
 
4742
4751
  // src/i18n/index.ts