Generic fixes for payjoin (#2342)

* feat: enhance Payjoin transaction details with block explorer link

* feat: enhance Payjoin transaction details with block explorer link

* fix: handle connectivity errors in Payjoin session operations
This commit is contained in:
Konstantin Ullrich 2025-06-27 15:38:09 +02:00 committed by GitHub
parent d0827dd39e
commit b3c20a5818
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 4 deletions

View file

@ -67,6 +67,8 @@ abstract class BitcoinWalletAddressesBase extends ElectrumWalletAddresses with S
payjoinManager.resumeSessions();
} catch (e) {
printV(e);
// Ignore Connectivity errors
if (!e.toString().contains("error sending request for url")) rethrow;
}
}
@ -79,6 +81,8 @@ abstract class BitcoinWalletAddressesBase extends ElectrumWalletAddresses with S
payjoinManager.spawnReceiver(receiver: currentPayjoinReceiver!);
} catch (e) {
printV(e);
// Ignore Connectivity errors
if (!e.toString().contains("error sending request for url")) rethrow;
}
}
}

View file

@ -106,8 +106,8 @@ class PayjoinSenderWorker {
sendPort.send({'type': PayjoinSenderRequestTypes.requestPosted});
return await postRequest.$2.processResponse(response: response);
} catch (e) {
throw PayjoinSessionError.unrecoverable('Send V1 payjoin error: $e');
} catch (e, stack) {
throw PayjoinSessionError.unrecoverable('Send V1 payjoin error: $e, $stack');
}
}