Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
BUILD_CONFIGURATION: Release
TESTFLIGHT_USERNAME: ${{ secrets.TESTFLIGHT_USERNAME }}
TESTFLIGHT_PASSWORD: ${{ secrets.TESTFLIGHT_PASSWORD }}
IOS_VERSION_STRING: 0.3.0
IOS_VERSION_STRING: 0.3.1
P12_BASE64: ${{ secrets.P12_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
GOOGLE_SERVICES_IOS: ${{ secrets.GOOGLE_SERVICES_IOS }}
Expand Down
14 changes: 11 additions & 3 deletions lib/utils/exceptions/exception_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class ExceptionHandler {
/// Private constructor to prevent instantiation
ExceptionHandler._();

/// Shown whenever the swap service is unavailable. Liquid send & receive need no
/// swapper, so they keep working and are the way forward for the user.
static const String _swapsUnavailable =
'Swaps are temporarily unavailable. You can still send and receive using a Liquid address.';

/// Extracts a user-friendly message from an exception
///
/// [exception] The exception to extract a message from
Expand Down Expand Up @@ -74,6 +79,10 @@ class ExceptionHandler {
if (error.err.toLowerCase().contains('non-final') ||
error.err.toLowerCase().contains('rpc error -26')) {
message = 'The transaction cannot be broadcast at this time. Please try again later.';
} else if (error.err.toLowerCase().contains('swap creation is disabled')) {
// Boltz keeps serving pairs while refusing to create swaps, so prepare_* succeeds
// and the refusal only surfaces here, as a 400 body flattened into a generic error.
message = _swapsUnavailable;
} else {
message = 'Payment error: ${error.err}';
}
Expand All @@ -88,9 +97,8 @@ class ExceptionHandler {
} else if (error is PaymentError_InvalidPreimage) {
message = 'The generated preimage is not valid';
} else if (error is PaymentError_PairsNotFound) {
// The swapper answered but offers no BTC/L-BTC pair, which is what a suspended
// swap service looks like. Liquid send & receive need no swapper, so point there.
message = 'Swaps are temporarily unavailable. You can still send and receive using a Liquid address.';
// The swapper answered but offers no BTC/L-BTC pair.
message = _swapsUnavailable;
} else if (error is PaymentError_PaymentTimeout) {
message = 'Payment start could not be verified within the configured timeout';
} else if (error is PaymentError_PersistError) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: misty_breez
description: "Flutter app showcasing Breez SDK - Nodeless (Liquid Implementation)."
publish_to: 'none'
version: 0.3.0
version: 0.3.1

environment:
sdk: '>=3.11.1 <4.0.0'
Expand Down
Loading