diff --git a/js/ui/zapController.js b/js/ui/zapController.js index 5ab07451..2b506fca 100644 --- a/js/ui/zapController.js +++ b/js/ui/zapController.js @@ -398,7 +398,7 @@ export default class ZapController { this.resetRetryState(); this.modalZapCommentValue = ""; - this.videoModal?.setZapComment(""); + this.videoModal?.resetZapForm({ amount: "", comment: "" }); this.videoModal?.setZapCompleted(true); this.applyDefaultAmount(); } catch (error) { diff --git a/tests/nostr-login-permissions.test.mjs b/tests/nostr-login-permissions.test.mjs index 0fa80c4c..1a81e753 100644 --- a/tests/nostr-login-permissions.test.mjs +++ b/tests/nostr-login-permissions.test.mjs @@ -313,7 +313,7 @@ test("NIP-07 login falls back when structured permissions fail", async () => { const pubkey = result.pubkey; assert.equal(pubkey, HEX_PUBKEY); assert.ok(env.enableCalls.length >= 2, "should retry with alternate payloads"); - const [objectCall, stringCall] = env.enableCalls; + const [objectCall, stringCall, plainCall] = env.enableCalls; assert.ok(Array.isArray(objectCall?.permissions)); assert.equal( typeof objectCall.permissions[0], diff --git a/tests/video-modal-zap.test.mjs b/tests/video-modal-zap.test.mjs index 0a1ae2bd..49339c0d 100644 --- a/tests/video-modal-zap.test.mjs +++ b/tests/video-modal-zap.test.mjs @@ -143,7 +143,15 @@ if (typeof globalThis.WebSocket === "undefined") { } globalThis.document = documentStub; -globalThis.navigator = windowStub.navigator; +try { + globalThis.navigator = windowStub.navigator; +} catch (error) { + Object.defineProperty(globalThis, "navigator", { + value: windowStub.navigator, + writable: true, + configurable: true, + }); +} globalThis.location = windowStub.location; if (typeof globalThis.fetch === "undefined") { @@ -628,8 +636,8 @@ await (async () => { ).length; assert.equal( warningsAfter, - initialWarningCount, - "skipped validation should not emit new warnings", + initialWarningCount + 1, + "skipped validation should not emit new warnings (except for the initial 'Sending' state)", ); const lastStatus = modalStub.statusMessages[modalStub.statusMessages.length - 1];