bump breez version and update code to match

This commit is contained in:
Matthew Fosse 2024-03-26 09:20:05 -07:00
parent 9b5aa9154c
commit 26a3ebdde0
2 changed files with 5 additions and 9 deletions

View file

@ -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(

View file

@ -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: