File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
libs/api/network-asset/data-access/src/lib Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,6 @@ export class ApiNetworkAssetSyncService {
209209 this . logger . error ( `[${ cluster } ] syncIdentity: Error syncing assets for ${ owner } on ${ cluster } : ${ error } ` )
210210 throw error
211211 }
212- const assetIds = assets . map ( ( a ) => a . account )
213212
214213 this . logger . verbose ( `[${ cluster } ] syncIdentity: Resolved ${ assets . length } assets for ${ owner } on ${ cluster } ` )
215214 if ( ! assets . length ) {
@@ -219,10 +218,13 @@ export class ApiNetworkAssetSyncService {
219218 // Upsert the assets
220219 await this . upsertAssets ( { cluster, assets, linkIdentity : true } )
221220
222- // Remove any assets that are not in the list
221+ // Remove any assets that are in these groups and did not get resolved.
222+ const groups = tokens . map ( ( t ) => t . account )
223+ const assetIds = assets . map ( ( a ) => a . account )
223224 const removedIds = await this . core . data . networkAsset . deleteMany ( {
224225 where : {
225226 owner,
227+ group : { in : groups } ,
226228 NOT : { account : { in : assetIds } } ,
227229 } ,
228230 } )
You can’t perform that action at this time.
0 commit comments