What changed, and why it matters
This commit is purely a code-formatting cleanup. It adjusts line breaks, indentation, and whitespace across six Dart files to match the project's style rules. No functionality, logic, or security behavior was changed.
No security action needed. Treat as a normal style-only commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows only whitespace and formatting changes produced by a Dart formatter. Examples include breaking long variable declarations across lines, reformatting chained method calls, adjusting switch-case indentation, and wrapping constructor arguments. There are no semantic edits, no new imports, no altered control flow, and no changes to cryptographic, network, or database operations beyond formatting.
Changed components
lib/pages/masternodes/masternodes_home_view.dartlib/pages/masternodes/sub_widgets/register_masternode_form.dartlib/pages/send_view/confirm_transaction_view.dartlib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dartlib/wallets/isar/models/wallet_info.dartlib/wallets/wallet/impl/firo_wallet.dartInspect captured patch +299 / −297
diff --git a/lib/pages/masternodes/masternodes_home_view.dart b/lib/pages/masternodes/masternodes_home_view.dart
index 2503c08..80be3bf 100644
--- a/lib/pages/masternodes/masternodes_home_view.dart
+++ b/lib/pages/masternodes/masternodes_home_view.dart
@@ -42,7 +42,8 @@ class _MasternodesHomeViewState extends ConsumerState<MasternodesHomeView> {
bool _isCheckingForCollateral = false;
Set<String> _dismissedCollateral(FiroWallet wallet) {
- final raw = wallet.info.otherData[WalletInfoKeys.firoMasternodeCollateralDismissed];
+ final raw =
+ wallet.info.otherData[WalletInfoKeys.firoMasternodeCollateralDismissed];
if (raw is! List) {
return {};
}
@@ -64,10 +65,9 @@ class _MasternodesHomeViewState extends ConsumerState<MasternodesHomeView> {
);
}
- Future<({String txid, int vout, String address})?> _findCollateralUtxo()
- async {
- final wallet =
- ref.read(pWallets).getWallet(widget.walletId) as FiroWallet;
+ Future<({String txid, int vout, String address})?>
+ _findCollateralUtxo() async {
+ final wallet = ref.read(pWallets).getWallet(widget.walletId) as FiroWallet;
final List<UTXO> utxos =
await (wallet.mainDB.getUTXOs(widget.walletId) as dynamic).findAll()
as List<UTXO>;
@@ -157,7 +157,8 @@ class _MasternodesHomeViewState extends ConsumerState<MasternodesHomeView> {
return;
}
- final wallet = ref.read(pWallets).getWallet(widget.walletId) as FiroWallet;
+ final wallet =
+ ref.read(pWallets).getWallet(widget.walletId) as FiroWallet;
final dismissed = _dismissedCollateral(wallet);
final collateralKey = "${collateral.txid}:${collateral.vout}";
if (dismissed.contains(collateralKey)) {
@@ -175,27 +176,22 @@ class _MasternodesHomeViewState extends ConsumerState<MasternodesHomeView> {
"A 1000 FIRO collateral UTXO was found in your wallet. "
"Would you like to register a masternode now?",
leftButton: TextButton(
- style: Theme.of(ctx)
- .extension<StackColors>()!
- .getSecondaryEnabledButtonStyle(ctx),
+ style: Theme.of(
+ ctx,
+ ).extension<StackColors>()!.getSecondaryEnabledButtonStyle(ctx),
child: Text(
"Later",
- style: STextStyles.button(
- ctx,
- ).copyWith(
+ style: STextStyles.button(ctx).copyWith(
color: Theme.of(ctx).extension<StackColors>()!.accentColorDark,
),
),
onPressed: () => Navigator.of(ctx).pop(false),
),
rightButton: TextButton(
- style: Theme.of(ctx)
- .extension<StackColors>()!
- .getPrimaryEnabledButtonStyle(ctx),
- child: Text(
- "Register",
- style: STextStyles.button(ctx),
- ),
+ style: Theme.of(
+ ctx,
+ ).extension<StackColors>()!.getPrimaryEnabledButtonStyle(ctx),
+ child: Text("Register", style: STextStyles.button(ctx)),
onPressed: () => Navigator.of(ctx).pop(true),
),
),
diff --git a/lib/pages/masternodes/sub_widgets/register_masternode_form.dart b/lib/pages/masternodes/sub_widgets/register_masternode_form.dart
index 1151d15..5d8dd94 100644
--- a/lib/pages/masternodes/sub_widgets/register_masternode_form.dart
+++ b/lib/pages/masternodes/sub_widgets/register_masternode_form.dart
@@ -188,9 +188,9 @@ class _RegisterMasternodeFormState
children: [
Text(
"Masternode collateral",
- style: STextStyles.w500_12(context).copyWith(
- color: stack.textSubtitle1,
- ),
+ style: STextStyles.w500_12(
+ context,
+ ).copyWith(color: stack.textSubtitle1),
),
const SizedBox(height: 4),
SelectableText(
@@ -202,9 +202,9 @@ class _RegisterMasternodeFormState
const SizedBox(height: 4),
SelectableText(
"${widget.collateralTxid}:${widget.collateralVout}",
- style: STextStyles.w500_12(context).copyWith(
- color: stack.textSubtitle1,
- ),
+ style: STextStyles.w500_12(
+ context,
+ ).copyWith(color: stack.textSubtitle1),
),
],
),
diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart
index 46c3fee..8f7eab5 100644
--- a/lib/pages/send_view/confirm_transaction_view.dart
+++ b/lib/pages/send_view/confirm_transaction_view.dart
@@ -360,9 +360,7 @@ class _ConfirmTransactionViewState
final recipientAddresses = <String>{};
final addresses = scriptPubKey['addresses'];
if (addresses is List) {
- recipientAddresses.addAll(
- addresses.whereType<String>(),
- );
+ recipientAddresses.addAll(addresses.whereType<String>());
}
final address = scriptPubKey['address'];
@@ -577,13 +575,12 @@ class _ConfirmTransactionViewState
.firstOrNull;
if (mnRecipient != null && confirmedTx.txid != null) {
- final ownAddress =
- await ref
- .read(mainDBProvider)
- .getAddresses(walletId)
- .filter()
- .valueEqualTo(mnRecipient.address)
- .findFirst();
+ final ownAddress = await ref
+ .read(mainDBProvider)
+ .getAddresses(walletId)
+ .filter()
+ .valueEqualTo(mnRecipient.address)
+ .findFirst();
if (ownAddress != null && context.mounted) {
final collateralVout = await _resolveFiroCollateralVout(
@@ -614,9 +611,9 @@ class _ConfirmTransactionViewState
void completeMnParentNavigation() {
if (widget.onSuccessInsteadOfRouteOnSuccess == null) {
if (isDesktop) {
- Navigator.of(context).popUntil(
- ModalRoute.withName(routeOnSuccessName),
- );
+ Navigator.of(
+ context,
+ ).popUntil(ModalRoute.withName(routeOnSuccessName));
} else {
final navigator = Navigator.of(context);
navigator.popUntil(
@@ -654,25 +651,27 @@ class _ConfirmTransactionViewState
} else {
final navContext =
(rootContext != null && rootContext.mounted)
- ? rootContext
- : context;
+ ? rootContext
+ : context;
if (!navContext.mounted) {
return;
}
unawaited(
- Navigator.of(navContext).pushNamed(
- CreateMasternodeView.routeName,
- arguments: {
- 'walletId': walletId,
- 'collateralTxid': confirmedTx.txid!,
- 'collateralVout': collateralVout,
- 'collateralAddress': mnRecipient.address,
- },
- ).then((result) {
- if (result is String) {
- _showMasternodeSubmittedDialog(rootContext, result);
- }
- }),
+ Navigator.of(navContext)
+ .pushNamed(
+ CreateMasternodeView.routeName,
+ arguments: {
+ 'walletId': walletId,
+ 'collateralTxid': confirmedTx.txid!,
+ 'collateralVout': collateralVout,
+ 'collateralAddress': mnRecipient.address,
+ },
+ )
+ .then((result) {
+ if (result is String) {
+ _showMasternodeSubmittedDialog(rootContext, result);
+ }
+ }),
);
}
}
@@ -693,20 +692,24 @@ class _ConfirmTransactionViewState
} else {
// If fee was subtracted from the recipient, users can enter 1000 but
// end up with ~999.99... output which is not valid MN collateral.
- final nearMnRecipient = confirmedTx.recipients!
- .where((r) => !r.isChange && r.amount.raw < masternodeAmount.raw)
- .where((r) => (masternodeAmount.raw - r.amount.raw) <= txFeeRaw)
- .toList()
- ..sort((a, b) => b.amount.raw.compareTo(a.amount.raw));
+ final nearMnRecipient =
+ confirmedTx.recipients!
+ .where(
+ (r) => !r.isChange && r.amount.raw < masternodeAmount.raw,
+ )
+ .where(
+ (r) => (masternodeAmount.raw - r.amount.raw) <= txFeeRaw,
+ )
+ .toList()
+ ..sort((a, b) => b.amount.raw.compareTo(a.amount.raw));
if (nearMnRecipient.isNotEmpty) {
- final maybeOwnAddress =
- await ref
- .read(mainDBProvider)
- .getAddresses(walletId)
- .filter()
- .valueEqualTo(nearMnRecipient.first.address)
- .findFirst();
+ final maybeOwnAddress = await ref
+ .read(mainDBProvider)
+ .getAddresses(walletId)
+ .filter()
+ .valueEqualTo(nearMnRecipient.first.address)
+ .findFirst();
if (maybeOwnAddress != null && context.mounted) {
unawaited(
diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart
index 57c5a11..decfd8c 100644
--- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart
+++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/more_features/more_features_dialog.dart
@@ -360,181 +360,186 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
mainAxisSize: MainAxisSize.min,
children: [
...widget.options.map((option) {
- switch (option.$1) {
- case WalletFeature.buy:
- // Buy has a special icon
- return _MoreFeaturesItem(
- label: option.$1.label,
- detail: option.$1.description,
- isSvgFile: true,
- iconAsset: ref.watch(
- themeProvider.select((value) => value.assets.buy),
- ),
- onPressed: () async {
- Navigator.of(context, rootNavigator: true).pop();
- option.$3();
- },
- );
-
- case WalletFeature.clearSparkCache:
- return _MoreFeaturesClearSparkCacheItem(
- cryptoCurrency: wallet.cryptoCurrency,
- );
-
- case WalletFeature.rbf:
- return _MoreFeaturesItemBase(
- child: Row(
- children: [
- const SizedBox(width: 3),
- SizedBox(
- height: 20,
- width: 40,
- child: DraggableSwitchButton(
- isOn:
- ref.watch(
- pWalletInfo(
- widget.walletId,
- ).select((value) => value.otherData),
- )[WalletInfoKeys.enableOptInRbf]
- as bool? ??
- false,
- onValueChanged: _switchRbfToggled,
- ),
- ),
- const SizedBox(width: 16),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Flag outgoing transactions with opt-in RBF",
- style: STextStyles.w600_20(context),
+ switch (option.$1) {
+ case WalletFeature.buy:
+ // Buy has a special icon
+ return _MoreFeaturesItem(
+ label: option.$1.label,
+ detail: option.$1.description,
+ isSvgFile: true,
+ iconAsset: ref.watch(
+ themeProvider.select((value) => value.assets.buy),
),
- ],
- ),
- ],
- ),
- );
-
- case WalletFeature.enableLegacyAddresses:
- return _MoreFeaturesItemBase(
- child: Row(
- children: [
- const SizedBox(width: 3),
- SizedBox(
- height: 20,
- width: 40,
- child: DraggableSwitchButton(
- isOn:
- ref.watch(
- pWalletInfo(
- widget.walletId,
- ).select((value) => value.otherData),
- )[WalletInfoKeys.enableLegacyAddresses]
- as bool? ??
- false,
- onValueChanged: _switchLegacyToggled,
- ),
- ),
- const SizedBox(width: 16),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Enable legacy (P2PKH) address generation",
- style: STextStyles.w600_20(context),
- ),
- ],
- ),
- ],
- ),
- );
-
- case WalletFeature.reuseAddress:
- return _MoreFeaturesItemBase(
- onPressed: _switchReuseAddressToggled,
- child: Row(
- children: [
- const SizedBox(width: 3),
- SizedBox(
- height: 20,
- width: 40,
- child: IgnorePointer(
- child: DraggableSwitchButton(
- isOn:
- ref.watch(
- pWalletInfo(
- widget.walletId,
- ).select((value) => value.otherData),
- )[WalletInfoKeys.reuseAddress]
- as bool? ??
- false,
- controller: _switchControllerAddressReuse,
+ onPressed: () async {
+ Navigator.of(context, rootNavigator: true).pop();
+ option.$3();
+ },
+ );
+
+ case WalletFeature.clearSparkCache:
+ return _MoreFeaturesClearSparkCacheItem(
+ cryptoCurrency: wallet.cryptoCurrency,
+ );
+
+ case WalletFeature.rbf:
+ return _MoreFeaturesItemBase(
+ child: Row(
+ children: [
+ const SizedBox(width: 3),
+ SizedBox(
+ height: 20,
+ width: 40,
+ child: DraggableSwitchButton(
+ isOn:
+ ref.watch(
+ pWalletInfo(widget.walletId).select(
+ (value) => value.otherData,
+ ),
+ )[WalletInfoKeys.enableOptInRbf]
+ as bool? ??
+ false,
+ onValueChanged: _switchRbfToggled,
+ ),
+ ),
+ const SizedBox(width: 16),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Flag outgoing transactions with opt-in RBF",
+ style: STextStyles.w600_20(context),
+ ),
+ ],
+ ),
+ ],
),
- ),
- ),
- const SizedBox(width: 16),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Reuse receiving address",
- style: STextStyles.w600_20(context),
+ );
+
+ case WalletFeature.enableLegacyAddresses:
+ return _MoreFeaturesItemBase(
+ child: Row(
+ children: [
+ const SizedBox(width: 3),
+ SizedBox(
+ height: 20,
+ width: 40,
+ child: DraggableSwitchButton(
+ isOn:
+ ref.watch(
+ pWalletInfo(widget.walletId).select(
+ (value) => value.otherData,
+ ),
+ )[WalletInfoKeys
+ .enableLegacyAddresses]
+ as bool? ??
+ false,
+ onValueChanged: _switchLegacyToggled,
+ ),
+ ),
+ const SizedBox(width: 16),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Enable legacy (P2PKH) address generation",
+ style: STextStyles.w600_20(context),
+ ),
+ ],
+ ),
+ ],
),
- ],
- ),
- ],
- ),
- );
-
- case WalletFeature.enableMweb:
- return _MoreFeaturesItemBase(
- onPressed: _switchMwebToggleToggled,
- child: Row(
- children: [
- const SizedBox(width: 3),
- SizedBox(
- height: 20,
- width: 40,
- child: IgnorePointer(
- child: DraggableSwitchButton(
- isOn:
- ref.watch(
- pWalletInfo(
- widget.walletId,
- ).select((value) => value.otherData),
- )[WalletInfoKeys.mwebEnabled]
- as bool? ??
- false,
- controller: _switchControllerMwebToggle,
+ );
+
+ case WalletFeature.reuseAddress:
+ return _MoreFeaturesItemBase(
+ onPressed: _switchReuseAddressToggled,
+ child: Row(
+ children: [
+ const SizedBox(width: 3),
+ SizedBox(
+ height: 20,
+ width: 40,
+ child: IgnorePointer(
+ child: DraggableSwitchButton(
+ isOn:
+ ref.watch(
+ pWalletInfo(
+ widget.walletId,
+ ).select(
+ (value) => value.otherData,
+ ),
+ )[WalletInfoKeys.reuseAddress]
+ as bool? ??
+ false,
+ controller: _switchControllerAddressReuse,
+ ),
+ ),
+ ),
+ const SizedBox(width: 16),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Reuse receiving address",
+ style: STextStyles.w600_20(context),
+ ),
+ ],
+ ),
+ ],
),
- ),
- ),
- const SizedBox(width: 16),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Enable MWEB",
- style: STextStyles.w600_20(context),
+ );
+
+ case WalletFeature.enableMweb:
+ return _MoreFeaturesItemBase(
+ onPressed: _switchMwebToggleToggled,
+ child: Row(
+ children: [
+ const SizedBox(width: 3),
+ SizedBox(
+ height: 20,
+ width: 40,
+ child: IgnorePointer(
+ child: DraggableSwitchButton(
+ isOn:
+ ref.watch(
+ pWalletInfo(
+ widget.walletId,
+ ).select(
+ (value) => value.otherData,
+ ),
+ )[WalletInfoKeys.mwebEnabled]
+ as bool? ??
+ false,
+ controller: _switchControllerMwebToggle,
+ ),
+ ),
+ ),
+ const SizedBox(width: 16),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Enable MWEB",
+ style: STextStyles.w600_20(context),
+ ),
+ ],
+ ),
+ ],
),
- ],
- ),
- ],
- ),
- );
-
- default:
- return _MoreFeaturesItem(
- label: option.$1.label,
- detail: option.$1.description,
- iconAsset: option.$2,
- onPressed: () async {
- Navigator.of(context, rootNavigator: true).pop();
- option.$3();
- },
- );
- }
- }),
+ );
+
+ default:
+ return _MoreFeaturesItem(
+ label: option.$1.label,
+ detail: option.$1.description,
+ iconAsset: option.$2,
+ onPressed: () async {
+ Navigator.of(context, rootNavigator: true).pop();
+ option.$3();
+ },
+ );
+ }
+ }),
const SizedBox(height: 28),
],
diff --git a/lib/wallets/isar/models/wallet_info.dart b/lib/wallets/isar/models/wallet_info.dart
index 5f385f8..12329f8 100644
--- a/lib/wallets/isar/models/wallet_info.dart
+++ b/lib/wallets/isar/models/wallet_info.dart
@@ -442,7 +442,8 @@ class WalletInfo implements IsarId {
}) async {
await updateOtherData(
newEntries: {
- WalletInfoKeys.solanaCustomTokenMintAddresses: newMintAddresses.toList(),
+ WalletInfoKeys.solanaCustomTokenMintAddresses: newMintAddresses
+ .toList(),
},
isar: isar,
);
diff --git a/lib/wallets/wallet/impl/firo_wallet.dart b/lib/wallets/wallet/impl/firo_wallet.dart
index af94ad1..ff2996e 100644
--- a/lib/wallets/wallet/impl/firo_wallet.dart
+++ b/lib/wallets/wallet/impl/firo_wallet.dart
@@ -946,26 +946,24 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
required int collateralVout,
required String collateralAddress,
}) async {
- final collateralAddr =
- await mainDB
- .getAddresses(walletId)
- .filter()
- .valueEqualTo(collateralAddress)
- .findFirst();
+ final collateralAddr = await mainDB
+ .getAddresses(walletId)
+ .filter()
+ .valueEqualTo(collateralAddress)
+ .findFirst();
if (collateralAddr == null || collateralAddr.derivationPath == null) {
throw Exception(
'Collateral address $collateralAddress not found in wallet '
'or has no derivation path.',
);
}
- final collateralUtxo =
- await mainDB
- .getUTXOs(walletId)
- .filter()
- .txidEqualTo(collateralTxid)
- .and()
- .voutEqualTo(collateralVout)
- .findFirst();
+ final collateralUtxo = await mainDB
+ .getUTXOs(walletId)
+ .filter()
+ .txidEqualTo(collateralTxid)
+ .and()
+ .voutEqualTo(collateralVout)
+ .findFirst();
final currentChainHeight = await chainHeight;
if (collateralUtxo == null ||
collateralUtxo.address != collateralAddress ||
@@ -993,10 +991,12 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
Address? ownerAddress = await getCurrentReceivingAddress();
const maxOwnerAttempts = 32;
- for (var i = 0;
- i < maxOwnerAttempts &&
- (ownerAddress == null || ownerAddress.value == collateralAddress);
- i++) {
+ for (
+ var i = 0;
+ i < maxOwnerAttempts &&
+ (ownerAddress == null || ownerAddress.value == collateralAddress);
+ i++
+ ) {
await generateNewReceivingAddress();
ownerAddress = await getCurrentReceivingAddress();
}
@@ -1024,8 +1024,8 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
);
// collateralOutpoint.hash (256 bit) — real txid, byte-reversed
- final collateralTxidBytes =
- collateralTxid.toUint8ListFromHex.reversed.toList();
+ final collateralTxidBytes = collateralTxid.toUint8ListFromHex.reversed
+ .toList();
if (collateralTxidBytes.length != 32) {
throw Exception("Invalid collateral txid: $collateralTxid");
}
@@ -1033,9 +1033,9 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
// collateralOutpoint.index (uint32)
registrationTx.add(
- (ByteData(4)..setUint32(0, collateralVout, Endian.little))
- .buffer
- .asUint8List(),
+ (ByteData(
+ 4,
+ )..setUint32(0, collateralVout, Endian.little)).buffer.asUint8List(),
);
// addr — IPv4-mapped IPv6 (16 bytes) + port (2 bytes big-endian)
@@ -1103,9 +1103,9 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
throw Exception("Invalid operator reward: $operatorReward");
}
registrationTx.add(
- (ByteData(2)..setInt16(0, operatorReward, Endian.little))
- .buffer
- .asUint8List(),
+ (ByteData(
+ 2,
+ )..setInt16(0, operatorReward, Endian.little)).buffer.asUint8List(),
);
// scriptPayout (variable) — must be P2PKH or P2SH per Firo consensus
@@ -1134,21 +1134,20 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
// --- coin selection for fee inputs only (exclude collateral UTXO) ---
final allUtxos = await mainDB.getUTXOs(walletId).findAll();
- final feeUtxos =
- allUtxos
- .where(
- (u) =>
- !(u.txid == collateralTxid && u.vout == collateralVout) &&
- !u.isBlocked &&
- u.used != true &&
- u.isConfirmed(
- currentChainHeight,
- cryptoCurrency.minConfirms,
- cryptoCurrency.minCoinbaseConfirms,
- ),
- )
- .map((e) => StandardInput(e) as BaseInput)
- .toList();
+ final feeUtxos = allUtxos
+ .where(
+ (u) =>
+ !(u.txid == collateralTxid && u.vout == collateralVout) &&
+ !u.isBlocked &&
+ u.used != true &&
+ u.isConfirmed(
+ currentChainHeight,
+ cryptoCurrency.minConfirms,
+ cryptoCurrency.minCoinbaseConfirms,
+ ),
+ )
+ .map((e) => StandardInput(e) as BaseInput)
+ .toList();
final partialTxData = TxData(
overrideVersion: 3 + (1 << 16),
@@ -1178,8 +1177,12 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
final inputsHashInput = BytesBuilder();
for (final input in partialTx.usedUTXOs!) {
final standardInput = input as StandardInput;
- final reversedTxidBytes =
- standardInput.utxo.txid.toUint8ListFromHex.reversed.toList();
+ final reversedTxidBytes = standardInput
+ .utxo
+ .txid
+ .toUint8ListFromHex
+ .reversed
+ .toList();
inputsHashInput.add(reversedTxidBytes);
inputsHashInput.add(
(ByteData(4)..setInt32(0, standardInput.utxo.vout, Endian.little))
@@ -1195,15 +1198,13 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
// SerializeHash(proRegTx) with SER_GETHASH excludes vchSig.
// The bytes built so far ARE the payload without vchSig.
final payloadForHash = registrationTx.toBytes();
- final payloadHash =
- crypto.sha256.convert(
- crypto.sha256.convert(payloadForHash).bytes,
- ).bytes;
+ final payloadHash = crypto.sha256
+ .convert(crypto.sha256.convert(payloadForHash).bytes)
+ .bytes;
// uint256::ToString() outputs bytes in reversed order
- final payloadHashHex =
- payloadHash.reversed
- .map((b) => b.toRadixString(16).padLeft(2, '0'))
- .join();
+ final payloadHashHex = payloadHash.reversed
+ .map((b) => b.toRadixString(16).padLeft(2, '0'))
+ .join();
// MakeSignString format from Firo's providertx.cpp
final signString =
@@ -1329,12 +1330,11 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
if (collateralTxids.isNotEmpty) {
try {
- final walletTxids =
- await mainDB.isar.transactionV2s
- .where()
- .walletIdEqualTo(walletId)
- .txidProperty()
- .findAll();
+ final walletTxids = await mainDB.isar.transactionV2s
+ .where()
+ .walletIdEqualTo(walletId)
+ .txidProperty()
+ .findAll();
if (walletTxids.isNotEmpty) {
final txs = await electrumXCachedClient.getBatchTransactions(
@@ -1347,10 +1347,7 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
final version = tx["version"];
final type = tx["type"];
final proReg = tx["proReg"];
- if (txid == null ||
- version != 3 ||
- type != 1 ||
- proReg is! Map) {
+ if (txid == null || version != 3 || type != 1 || proReg is! Map) {
continue;
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.