mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
correct address for utxo card
This commit is contained in:
parent
3cad15652e
commit
c70a8f415c
1 changed files with 3 additions and 14 deletions
|
@ -46,22 +46,11 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
|
||||||
final coin = ref.watch(walletsChangeNotifierProvider
|
final coin = ref.watch(walletsChangeNotifierProvider
|
||||||
.select((value) => value.getManager(widget.walletId).coin));
|
.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;
|
String? label;
|
||||||
if (addr != null) {
|
if (utxo.address != null) {
|
||||||
label = MainDB.instance.isar.addressLabels
|
label = MainDB.instance.isar.addressLabels
|
||||||
.where()
|
.where()
|
||||||
.addressStringWalletIdEqualTo(addr, widget.walletId)
|
.addressStringWalletIdEqualTo(utxo.address!, widget.walletId)
|
||||||
.findFirstSync()
|
.findFirstSync()
|
||||||
?.value;
|
?.value;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +89,7 @@ class _UtxoCardState extends ConsumerState<UtxoCard> {
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
label ?? addr ?? utxo.txid,
|
label ?? utxo.address ?? utxo.txid,
|
||||||
style: STextStyles.w500_12(context).copyWith(
|
style: STextStyles.w500_12(context).copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
|
|
Loading…
Reference in a new issue