Skip to content

Commit 16cd9b6

Browse files
committed
received jsplit not showing as confirmed in ui fix
1 parent 1da49a0 commit 16cd9b6

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

lib/services/coins/firo/firo_wallet.dart

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,34 +2769,12 @@ class FiroWallet extends CoinServiceAPI {
27692769
}
27702770
}
27712771

2772-
if (value.txType == "Received" &&
2773-
!listLelantusTxData.containsKey(value.txid)) {
2774-
// Every receive should be listed whether minted or not.
2772+
if (value.txType == "Received" && value.subType != "mint") {
2773+
// Every receive other than a mint should be shown. Mints will be collected and shown from the send side
27752774
listLelantusTxData[value.txid] = value;
2776-
} else if (value.txType == "Sent"
2777-
// &&
2778-
// hasAtLeastOneReceive &&
2779-
// value.subType == "mint"
2780-
) {
2775+
} else if (value.txType == "Sent") {
2776+
// all sends should be shown, mints will be displayed correctly in the ui
27812777
listLelantusTxData[value.txid] = value;
2782-
2783-
// use mint sends to update receives with user readable values.
2784-
2785-
// int sharedFee = value.fees ~/ howManyReceiveInputs;
2786-
//
2787-
// for (var element in value.inputs) {
2788-
// if (listLelantusTxData.containsKey(element.txid) &&
2789-
// listLelantusTxData[element.txid]!.txType == "Received") {
2790-
// listLelantusTxData[element.txid] =
2791-
// listLelantusTxData[element.txid]!.copyWith(
2792-
// fees: sharedFee,
2793-
// subType: "mint",
2794-
// height: value.height,
2795-
// confirmedStatus: value.confirmedStatus,
2796-
// otherData: value.txid,
2797-
// );
2798-
// }
2799-
// }
28002778
}
28012779
});
28022780

@@ -3305,11 +3283,12 @@ class FiroWallet extends CoinServiceAPI {
33053283
}
33063284
}
33073285

3286+
final int confirms = txObject["confirmations"] as int? ?? 0;
3287+
33083288
// create final tx map
33093289
midSortedTx["txid"] = txObject["txid"];
3310-
midSortedTx["confirmed_status"] = (txObject["confirmations"] is int) &&
3311-
(txObject["confirmations"] as int > 0);
3312-
midSortedTx["confirmations"] = txObject["confirmations"] ?? 0;
3290+
midSortedTx["confirmed_status"] = confirms >= MINIMUM_CONFIRMATIONS;
3291+
midSortedTx["confirmations"] = confirms;
33133292
midSortedTx["timestamp"] = txObject["blocktime"] ??
33143293
(DateTime.now().millisecondsSinceEpoch ~/ 1000);
33153294
if (foundInSenders) {

0 commit comments

Comments
 (0)