feat(storage): add contacts list to WalletDocument
Adds StoredContact class and a Contacts list to WalletDocument so the address book survives app restarts inside the encrypted wallet file.
This commit is contained in:
@@ -40,6 +40,9 @@ public sealed class WalletDocument
|
|||||||
/// <summary>Etichette per indirizzo/txid (§12).</summary>
|
/// <summary>Etichette per indirizzo/txid (§12).</summary>
|
||||||
public Dictionary<string, string> Labels { get; set; } = [];
|
public Dictionary<string, string> Labels { get; set; } = [];
|
||||||
|
|
||||||
|
/// <summary>Rubrica contatti (nome + indirizzo blockchain).</summary>
|
||||||
|
public List<StoredContact> Contacts { get; set; } = [];
|
||||||
|
|
||||||
/// <summary>Cache dell'ultimo stato sincronizzato (saldo/storico mostrabili offline).</summary>
|
/// <summary>Cache dell'ultimo stato sincronizzato (saldo/storico mostrabili offline).</summary>
|
||||||
public SyncCache? Cache { get; set; }
|
public SyncCache? Cache { get; set; }
|
||||||
|
|
||||||
@@ -69,6 +72,13 @@ public sealed class WalletDocument
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Contatto in rubrica: nome leggibile + indirizzo blockchain.</summary>
|
||||||
|
public sealed class StoredContact
|
||||||
|
{
|
||||||
|
public required string Name { get; set; }
|
||||||
|
public required string Address { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Stato sincronizzato persistito: permette di mostrare saldo/storico offline.</summary>
|
/// <summary>Stato sincronizzato persistito: permette di mostrare saldo/storico offline.</summary>
|
||||||
public sealed class SyncCache
|
public sealed class SyncCache
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user