Skip to content
Merged

Fixes #1028

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
4 changes: 4 additions & 0 deletions lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ class TransactionV2 {
return fee;
}

if (isCoinbase()) {
return Amount.zeroWith(fractionDigits: fractionDigits);
}

final inSum =
inputs.map((e) => e.value).reduce((value, element) => value += element);
final outSum = outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class _DesktopWalletFeaturesState extends ConsumerState<DesktopWalletFeatures> {
barrierDismissible: false,
builder: (context) => DesktopDialog(
maxWidth: 500,
maxHeight: 210,
maxHeight: double.infinity,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 20),
child: Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
wallet.viewOnlyType == ViewOnlyWalletType.addressOnly;

return DesktopDialog(
maxHeight: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,9 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
cryptoCurrency: cryptoCurrency,
);

final inputs = txn["vin"] as List? ?? [];
final isCoinbase = inputs.any((e) => (e as Map?)?["coinbase"] != null);

final vout = jsonUTXO["tx_pos"] as int;

final outputs = txn["vout"] as List;
Expand Down Expand Up @@ -1221,7 +1224,10 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
name: checkBlockResult.utxoLabel ?? "",
isBlocked: checkBlockResult.blocked,
blockedReason: checkBlockResult.blockedReason,
isCoinbase: txn["is_coinbase"] as bool? ?? false,
isCoinbase: txn["is_coinbase"] as bool? ??
txn["is-coinbase"] as bool? ??
txn["iscoinbase"] as bool? ??
isCoinbase,
blockHash: txn["blockhash"] as String?,
blockHeight: jsonUTXO["height"] as int?,
blockTime: txn["blocktime"] as int?,
Expand Down
Loading