From c6b76bc64d798d781db1fddc0c6c65a0301ed586 Mon Sep 17 00:00:00 2001 From: Kieran Date: Wed, 28 May 2025 11:16:49 +0100 Subject: [PATCH] fix: close zap modal after zap closes #37 --- lib/pages/stream.dart | 5 ++++- lib/widgets/zap.dart | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pages/stream.dart b/lib/pages/stream.dart index 7f2823d..856e029 100644 --- a/lib/pages/stream.dart +++ b/lib/pages/stream.dart @@ -172,12 +172,15 @@ class _StreamPage extends State with RouteAware { showModalBottomSheet( context: context, constraints: BoxConstraints.expand(), - builder: (ctx) { + builder: (context) { return SingleChildScrollView( primary: false, child: ZapWidget( pubkey: stream.info.host, target: stream.event, + onPaid: (_) { + context.pop(); + }, zapTags: // tag goal onto zap request stream.info.goal != null diff --git a/lib/widgets/zap.dart b/lib/widgets/zap.dart index 42d77ec..0053ce8 100644 --- a/lib/widgets/zap.dart +++ b/lib/widgets/zap.dart @@ -283,6 +283,7 @@ class _ZapWidget extends State { zapRequest: zapRequest, ); + // auto pay with NWC final wallet = await loginData.value?.getWallet(); if (wallet != null && invoice != null) { try {