fix: Payjoin button not showing (#2272)

This commit is contained in:
Konstantin Ullrich 2025-05-15 13:56:43 +02:00 committed by GitHub
parent 40084ec532
commit 1b2e3f2ee1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -210,16 +210,21 @@ class QRWidget extends StatelessWidget {
), ),
), ),
), ),
if (addressListViewModel.payjoinEndpoint.isNotEmpty) ...[ Observer(
Padding( builder: (_) => Offstage(
offstage: addressListViewModel.payjoinEndpoint.isEmpty,
child: Padding(
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
child: PrimaryImageButton( child: PrimaryImageButton(
onPressed: () { onPressed: () {
Clipboard.setData(ClipboardData( Clipboard.setData(
text: addressListViewModel.payjoinEndpoint)); ClipboardData(text: addressUri.toString()));
showBar<void>(context, S.of(context).copied_to_clipboard); showBar<void>(context, S.of(context).copied_to_clipboard);
}, },
image: Image.asset('assets/images/payjoin.png', width: 25,), image: Image.asset(
'assets/images/payjoin.png',
width: 25,
),
text: S.of(context).copy_payjoin_url, text: S.of(context).copy_payjoin_url,
color: Theme.of(context).cardColor, color: Theme.of(context).cardColor,
textColor: Theme.of(context) textColor: Theme.of(context)
@ -227,7 +232,8 @@ class QRWidget extends StatelessWidget {
.buttonTextColor, .buttonTextColor,
), ),
), ),
], ),
),
], ],
), ),
), ),