Skip to content

Commit

Permalink
Merge pull request #69 from show-karma/staging
Browse files Browse the repository at this point in the history
hotfix: revoke !== add
  • Loading branch information
Arthh authored Jun 12, 2023
2 parents 2e0fe83 + 28dc77a commit 7c43e55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/apecoin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async function manageRoles(client: Client, guildId: string, handles: string[], a
if (!delegates?.length) return;

const addHandles = [];
const revokeHandles = [];
let revokeHandles = [];

const delegatesBalance = await getTokenBalance(
delegates.map((d) => d.publicAddress),
Expand All @@ -111,6 +111,8 @@ async function manageRoles(client: Client, guildId: string, handles: string[], a
(hasPermission ? addHandles : revokeHandles).push(delegate.discordHandle);
}

revokeHandles = revokeHandles.filter((handle) => !addHandles.includes(handle));

console.log('addHandles', addHandles);
console.log('revokeHandles', revokeHandles);

Expand Down

0 comments on commit 7c43e55

Please sign in to comment.