shogun-button-react 1.3.14 → 1.3.16

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.
@@ -624,7 +624,17 @@ export const ShogunButton = (() => {
624
624
  const result = await signUp("password", formUsername, formPassword, formPasswordConfirm);
625
625
  if (result && result.success) {
626
626
  if (core === null || core === void 0 ? void 0 : core.db) {
627
- await core.db.setPasswordHint(formHint);
627
+ try {
628
+ const res = await core.db.setPasswordHintWithSecurity(formUsername, formPassword, formHint, [formSecurityQuestion], [formSecurityAnswer]);
629
+ if (!(res === null || res === void 0 ? void 0 : res.success)) {
630
+ // Fallback to legacy hint storage to avoid losing the hint
631
+ await core.db.setPasswordHint(formHint);
632
+ }
633
+ }
634
+ catch {
635
+ // Last-resort fallback
636
+ await core.db.setPasswordHint(formHint);
637
+ }
628
638
  }
629
639
  setModalIsOpen(false);
630
640
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shogun-button-react",
3
3
  "description": "Shogun connector button",
4
- "version": "1.3.14",
4
+ "version": "1.3.16",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/styles/index.css"
@@ -34,7 +34,7 @@
34
34
  "ethers": "^6.13.5",
35
35
  "prettier": "^3.5.3",
36
36
  "rxjs": "^7.8.1",
37
- "shogun-core": "^1.10.4"
37
+ "shogun-core": "^1.10.5"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": "^18.0.0",