shogun-button-react 1.3.14 → 1.3.15
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
|
-
|
|
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
|
}
|