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 Coin coin;
|
||||||
final String address;
|
final String address;
|
||||||
final String label;
|
final String label;
|
||||||
|
final String? other;
|
||||||
|
|
||||||
const ContactAddressEntry({
|
const ContactAddressEntry({
|
||||||
required this.coin,
|
required this.coin,
|
||||||
required this.address,
|
required this.address,
|
||||||
required this.label,
|
required this.label,
|
||||||
|
this.other,
|
||||||
});
|
});
|
||||||
|
|
||||||
ContactAddressEntry copyWith({
|
ContactAddressEntry copyWith({
|
||||||
Coin? coin,
|
Coin? coin,
|
||||||
String? address,
|
String? address,
|
||||||
String? label,
|
String? label,
|
||||||
|
String? other,
|
||||||
}) {
|
}) {
|
||||||
return ContactAddressEntry(
|
return ContactAddressEntry(
|
||||||
coin: coin ?? this.coin,
|
coin: coin ?? this.coin,
|
||||||
address: address ?? this.address,
|
address: address ?? this.address,
|
||||||
label: label ?? this.label,
|
label: label ?? this.label,
|
||||||
|
other: other ?? this.other,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +34,7 @@ class ContactAddressEntry {
|
||||||
coin: Coin.values.byName(jsonObject["coin"] as String),
|
coin: Coin.values.byName(jsonObject["coin"] as String),
|
||||||
address: jsonObject["address"] as String,
|
address: jsonObject["address"] as String,
|
||||||
label: jsonObject["label"] as String,
|
label: jsonObject["label"] as String,
|
||||||
|
other: jsonObject["other"] as String?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +43,7 @@ class ContactAddressEntry {
|
||||||
"label": label,
|
"label": label,
|
||||||
"address": address,
|
"address": address,
|
||||||
"coin": coin.name,
|
"coin": coin.name,
|
||||||
|
"other": other ?? "",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ class _AddressBookViewState extends ConsumerState<AddressBookView> {
|
||||||
coin: manager.coin,
|
coin: manager.coin,
|
||||||
address: await manager.currentReceivingAddress,
|
address: await manager.currentReceivingAddress,
|
||||||
label: "Current Receiving",
|
label: "Current Receiving",
|
||||||
|
other: manager.walletName,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,6 +208,16 @@ class ContactPopUp extends ConsumerWidget {
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
if (contact.id == "default")
|
||||||
|
Text(
|
||||||
|
e.other!,
|
||||||
|
style:
|
||||||
|
STextStyles.itemSubtitle12,
|
||||||
|
),
|
||||||
|
if (contact.id == "default")
|
||||||
|
const SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
"${e.label} (${e.coin.ticker})",
|
"${e.label} (${e.coin.ticker})",
|
||||||
style: STextStyles.itemSubtitle12,
|
style: STextStyles.itemSubtitle12,
|
||||||
|
|
Loading…
Reference in a new issue