mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-19 10:04:17 +01:00
Cw-58: Show subaddress label on the transaction details page (#333)
* CW-58: Show subaddress label on the transaction details page * add translations * Fix interface
This commit is contained in:
@@ -294,4 +294,9 @@ class CWMonero extends Monero {
|
||||
final moneroWallet = wallet as MoneroWallet;
|
||||
return moneroWallet.getTransactionAddress(accountIndex, addressIndex);
|
||||
}
|
||||
|
||||
String getSubaddressLabel(Object wallet, int accountIndex, int addressIndex) {
|
||||
final moneroWallet = wallet as MoneroWallet;
|
||||
return moneroWallet.getSubaddressLabel(accountIndex, addressIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
addressIndex != null) {
|
||||
try {
|
||||
final address = monero.getTransactionAddress(wallet, accountIndex, addressIndex);
|
||||
final label = monero.getSubaddressLabel(wallet, accountIndex, addressIndex);
|
||||
|
||||
if (address?.isNotEmpty ?? false) {
|
||||
isRecipientAddressShown = true;
|
||||
@@ -68,6 +69,14 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
title: S.current.transaction_details_recipient_address,
|
||||
value: address));
|
||||
}
|
||||
|
||||
if (label?.isNotEmpty ?? false) {
|
||||
_items.add(
|
||||
StandartListItem(
|
||||
title: S.current.address_label,
|
||||
value: label)
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user