correct address for utxo card

This commit is contained in:
julian 2023-03-06 14:47:14 -06:00
parent 3cad15652e
commit c70a8f415c

View file

@ -46,22 +46,11 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
final coin = ref.watch(walletsChangeNotifierProvider
.select((value) => value.getManager(widget.walletId).coin));
final addr = MainDB.instance.isar.transactions
.where()
.txidWalletIdEqualTo(
utxo.txid,
widget.walletId,
)
.findFirstSync()
?.address
.value
?.value;
String? label;
if (addr != null) {
if (utxo.address != null) {
label = MainDB.instance.isar.addressLabels
.where()
.addressStringWalletIdEqualTo(addr, widget.walletId)
.addressStringWalletIdEqualTo(utxo.address!, widget.walletId)
.findFirstSync()
?.value;
}
@ -100,7 +89,7 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
children: [
Flexible(
child: Text(
label ?? addr ?? utxo.txid,
label ?? utxo.address ?? utxo.txid,
style: STextStyles.w500_12(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!