mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-30 14:15:52 +00:00
Show wallet name for default/MyStack contact addresses on popup
This commit is contained in:
parent
73ae1c7c90
commit
f61621896c
3 changed files with 17 additions and 0 deletions
|
@ -6,22 +6,26 @@ class ContactAddressEntry {
|
|||
final Coin coin;
|
||||
final String address;
|
||||
final String label;
|
||||
final String? other;
|
||||
|
||||
const ContactAddressEntry({
|
||||
required this.coin,
|
||||
required this.address,
|
||||
required this.label,
|
||||
this.other,
|
||||
});
|
||||
|
||||
ContactAddressEntry copyWith({
|
||||
Coin? coin,
|
||||
String? address,
|
||||
String? label,
|
||||
String? other,
|
||||
}) {
|
||||
return ContactAddressEntry(
|
||||
coin: coin ?? this.coin,
|
||||
address: address ?? this.address,
|
||||
label: label ?? this.label,
|
||||
other: other ?? this.other,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -30,6 +34,7 @@ class ContactAddressEntry {
|
|||
coin: Coin.values.byName(jsonObject["coin"] as String),
|
||||
address: jsonObject["address"] as String,
|
||||
label: jsonObject["label"] as String,
|
||||
other: jsonObject["other"] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -38,6 +43,7 @@ class ContactAddressEntry {
|
|||
"label": label,
|
||||
"address": address,
|
||||
"coin": coin.name,
|
||||
"other": other ?? "",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ class _AddressBookViewState extends ConsumerState<AddressBookView> {
|
|||
coin: manager.coin,
|
||||
address: await manager.currentReceivingAddress,
|
||||
label: "Current Receiving",
|
||||
other: manager.walletName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -208,6 +208,16 @@ class ContactPopUp extends ConsumerWidget {
|
|||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (contact.id == "default")
|
||||
Text(
|
||||
e.other!,
|
||||
style:
|
||||
STextStyles.itemSubtitle12,
|
||||
),
|
||||
if (contact.id == "default")
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Text(
|
||||
"${e.label} (${e.coin.ticker})",
|
||||
style: STextStyles.itemSubtitle12,
|
||||
|
|
Loading…
Reference in a new issue