File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,17 @@ class Trust {
108108 ) ;
109109
110110 if ( exclude_managed ) {
111- result . result = result . result . filter ( relationship =>
112- relationship . request_type !== 'manage' &&
113- relationship . request_type !== 'yield'
114- ) ;
111+ const managedWalletIdSet = new Set ( managedWallets . map ( ( wallet ) => wallet . id ) ) ;
112+
113+ result . result = result . result . filter ( relationship => {
114+ const actorIsManaged = managedWalletIdSet . has ( relationship . actor_wallet_id ) ;
115+ const targetIsManaged = managedWalletIdSet . has ( relationship . target_wallet_id ) ;
116+
117+ const isBothManagedInternal = actorIsManaged && targetIsManaged ;
118+
119+ return ! isBothManagedInternal ;
120+ } ) ;
121+
115122 result . count = result . result . length ;
116123 }
117124
You can’t perform that action at this time.
0 commit comments