account work

This commit is contained in:
Christien Rioux 2023-07-25 01:04:34 -04:00
parent b7236befd1
commit b502bc20a7
20 changed files with 168 additions and 95 deletions

View file

@ -52,11 +52,11 @@ class LocalAccounts extends _$LocalAccounts
/// Creates a new account associated with master identity
Future<LocalAccount> newAccount(
IdentityMaster identityMaster,
SecretKey identitySecret,
EncryptionKeyType encryptionKeyType,
String encryptionKey,
proto.Account account) async {
{required IdentityMaster identityMaster,
required SecretKey identitySecret,
EncryptionKeyType encryptionKeyType = EncryptionKeyType.none,
String encryptionKey = "",
required proto.Account account}) async {
final veilid = await eventualVeilid.future;
final localAccounts = state.requireValue;
@ -114,7 +114,7 @@ class LocalAccounts extends _$LocalAccounts
await identityRec.eventualUpdateJson(Identity.fromJson,
(oldIdentity) async {
final accountRecords = IMapOfSets.from(oldIdentity.accountRecords)
.add("VeilidChat", newAccountRecordInfo)
.add("com.veilid.veilidchat", newAccountRecordInfo)
.asIMap();
return oldIdentity.copyWith(accountRecords: accountRecords);
});