From 26a3ebdde0431ffd102cf29e6537ad82b0222f8e Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Tue, 26 Mar 2024 09:20:05 -0700 Subject: [PATCH] bump breez version and update code to match --- lib/view_model/lightning_view_model.dart | 12 ++++-------- pubspec_base.yaml | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/view_model/lightning_view_model.dart b/lib/view_model/lightning_view_model.dart index 5063d2d9e..626ac5cd0 100644 --- a/lib/view_model/lightning_view_model.dart +++ b/lib/view_model/lightning_view_model.dart @@ -32,10 +32,8 @@ abstract class LightningViewModelBase with Store { int inboundLiquidity = nodeState.inboundLiquidityMsats ~/ 1000; final openingFees = await sdk.openChannelFee( req: BZG.OpenChannelFeeRequest(amountMsat: inboundLiquidity + 1)); - if (openingFees.usedFeeParams != null) { - feePercent = (openingFees.usedFeeParams!.proportional * 100) / 1000000; - fee = openingFees.usedFeeParams!.minMsat ~/ 1000; - } + feePercent = (openingFees.feeParams.proportional * 100) / 1000000; + fee = openingFees.feeParams.minMsat ~/ 1000; } catch (_) {} return ReceiveOnchainResult( @@ -72,10 +70,8 @@ abstract class LightningViewModelBase with Store { final openingFees = await sdk.openChannelFee( req: BZG.OpenChannelFeeRequest(amountMsat: inboundLiquidity + 1)); - if (openingFees.usedFeeParams != null) { - feePercent = (openingFees.usedFeeParams!.proportional * 100) / 1000000; - minFee = openingFees.usedFeeParams!.minMsat ~/ 1000; - } + feePercent = (openingFees.feeParams.proportional * 100) / 1000000; + minFee = openingFees.feeParams.minMsat ~/ 1000; balance = nodeState.channelsBalanceMsat ~/ 1000; } catch (_) {} return InvoiceSoftLimitsResult( diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 0cf47f6a4..7766412cb 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -115,7 +115,7 @@ dependencies: breez_sdk: git: url: https://github.com/breez/breez-sdk-flutter.git - ref: v0.2.14 + ref: v0.3.8 dev_dependencies: