Skip to content

Commit

Permalink
fix(core): fix filter by groupCreated true post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
iFergal committed May 8, 2024
1 parent a83f8b7 commit 5c96255
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
10 changes: 0 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion src/core/agent/records/identifierStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class IdentifierStorage {
const records = await this.storageService.findAllByQuery(
{
isArchived,
$not: {
groupCreated: true,
},
},
IdentifierMetadataRecord
);
Expand All @@ -45,7 +48,12 @@ class IdentifierStorage {
metadata: Partial<
Pick<
IdentifierMetadataRecord,
"displayName" | "theme" | "isArchived" | "isPending" | "isDeleted"
| "displayName"
| "theme"
| "isArchived"
| "isPending"
| "isDeleted"
| "groupMetadata"
>
>
): Promise<void> {
Expand All @@ -60,6 +68,8 @@ class IdentifierStorage {
identifierMetadataRecord.isPending = metadata.isPending;
if (metadata.isDeleted !== undefined)
identifierMetadataRecord.isDeleted = metadata.isDeleted;
if (metadata.groupMetadata !== undefined)
identifierMetadataRecord.groupMetadata = metadata.groupMetadata;
await this.storageService.update(identifierMetadataRecord);
}

Expand Down
5 changes: 4 additions & 1 deletion src/core/agent/services/multiSigService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ class MultiSigService extends AgentService {
multisigManageAid: ourIdentifier,
});
ourMetadata.groupMetadata.groupCreated = true;
await Agent.agent.identifiers.updateIdentifier(ourMetadata.id, ourMetadata);
await this.identifierStorage.updateIdentifierMetadata(
ourMetadata.id,
ourMetadata
);
return { identifier: multisigId, signifyName };
}

Expand Down

0 comments on commit 5c96255

Please sign in to comment.