Skip to content

Commit 98633ec

Browse files
author
Cyrix126
committed
fix: dart formatting
1 parent af2a51a commit 98633ec

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
227227
// "coinControl", "SendAll", "MWEB", "overrideFeeAmount",
228228
// because they do not need a selection or
229229
// do not meet the requirements for the algorithms
230-
final bool useOptimalSelection = !coinControl &&
230+
final bool useOptimalSelection =
231+
!coinControl &&
231232
!isSendAll &&
232233
!isSendAllCoinControlUtxos &&
233234
overrideFeeAmount == null &&
@@ -652,8 +653,9 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
652653
required BigInt feeRatePerKB,
653654
required Address changeAddress,
654655
}) async {
655-
final List<BaseInput> candidateInputs =
656-
await addSigningKeys(spendableOutputs);
656+
final List<BaseInput> candidateInputs = await addSigningKeys(
657+
spendableOutputs,
658+
);
657659

658660
final BigInt feePerKb = satsPerVByte != null
659661
? BigInt.from(satsPerVByte * 1000)
@@ -668,18 +670,15 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
668670
final Map<int, BaseInput> candidateBaseInputs = {};
669671

670672
for (int i = 0; i < candidateInputs.length; i++) {
671-
672673
final baseInput = candidateInputs[i];
673674

674675
if (baseInput is! StandardInput) {
675676
// This shouldn't be happening since only non MWEB inputs
676677
// will be given to this helper
677-
throw Exception(
678-
'''
678+
throw Exception('''
679679
Unexpected input type ${baseInput.runtimeType}
680680
only StandardInput are supported
681-
''',
682-
);
681+
''');
683682
}
684683

685684
final input = standardInputToCoinlibInput(baseInput);
@@ -706,15 +705,14 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
706705

707706
final coinlib.Program changeProgram = clChangeAddress.program;
708707

709-
final coinlib.CoinSelection selection =
710-
coinlib.CoinSelection.optimal(
711-
candidates: candidates,
712-
recipients: [recipientOutput],
713-
changeProgram: changeProgram,
714-
feePerKb: feePerKb,
715-
minFee: minFee,
716-
minChange: cryptoCurrency.dustLimit.raw,
717-
);
708+
final coinlib.CoinSelection selection = coinlib.CoinSelection.optimal(
709+
candidates: candidates,
710+
recipients: [recipientOutput],
711+
changeProgram: changeProgram,
712+
feePerKb: feePerKb,
713+
minFee: minFee,
714+
minChange: cryptoCurrency.dustLimit.raw,
715+
);
718716

719717
if (selection.tooLarge) {
720718
throw Exception("Selected transaction would be too large");
@@ -727,8 +725,9 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
727725
// This could be avoided since buildTransaction will do the exact opposite ?
728726
final List<BaseInput> selectedBaseInputs = [];
729727
for (final picked in selection.selected) {
730-
final pickedTxid =
731-
Uint8List.fromList(picked.input.prevOut.hash.reversed.toList()).toHex;
728+
final pickedTxid = Uint8List.fromList(
729+
picked.input.prevOut.hash.reversed.toList(),
730+
).toHex;
732731
final pickedVout = picked.input.prevOut.n;
733732
bool matched = false;
734733
for (final entry in candidateBaseInputs.entries) {

0 commit comments

Comments
 (0)