mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 13:52:58 +00:00
update from claude
This commit is contained in:
1 parent
51a34b046a
commit
1dbac77753
6 files changed
+69
-57
No files matched your search
+14
-10
@@ -957,31 +957,35 @@ class SubscriptionsManager {
|
||||
decryptors.set(scheme, handler);
|
||||
};
|
||||
|
||||
// Use a shorter per-call timeout during background/login loads (no
|
||||
// permission prompt) so stalled extension calls fail fast. Interactive
|
||||
// loads get more time because the user may be approving a popup.
|
||||
const nip07DecryptTimeoutMs = allowPermissionPrompt ? 12000 : 5000;
|
||||
const signerDecryptOptions = {
|
||||
priority: NIP07_PRIORITY.HIGH,
|
||||
timeoutMs: nip07DecryptTimeoutMs,
|
||||
retryMultiplier: 1,
|
||||
};
|
||||
|
||||
if (signerHasNip44) {
|
||||
registerDecryptor("nip44", (payload) =>
|
||||
signer.nip44Decrypt(userPubkey, payload, {
|
||||
priority: NIP07_PRIORITY.HIGH,
|
||||
}),
|
||||
signer.nip44Decrypt(userPubkey, payload, signerDecryptOptions),
|
||||
);
|
||||
registerDecryptor("nip44_v2", (payload) =>
|
||||
signer.nip44Decrypt(userPubkey, payload, {
|
||||
priority: NIP07_PRIORITY.HIGH,
|
||||
}),
|
||||
signer.nip44Decrypt(userPubkey, payload, signerDecryptOptions),
|
||||
);
|
||||
}
|
||||
|
||||
if (signerHasNip04) {
|
||||
registerDecryptor("nip04", (payload) =>
|
||||
signer.nip04Decrypt(userPubkey, payload, {
|
||||
priority: NIP07_PRIORITY.HIGH,
|
||||
}),
|
||||
signer.nip04Decrypt(userPubkey, payload, signerDecryptOptions),
|
||||
);
|
||||
}
|
||||
|
||||
if (nostrApi) {
|
||||
const decrypterOptions = {
|
||||
priority: NIP07_PRIORITY.HIGH,
|
||||
timeoutMs: 12000,
|
||||
timeoutMs: nip07DecryptTimeoutMs,
|
||||
retryMultiplier: 1,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user