Skip to content

Commit

Permalink
refactor: use Bitwise OR to toggle ON permission
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Oct 17, 2023
1 parent 6db8835 commit 75ebf9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export class ERC725 {
static encodePermissions(permissions: Permissions): string {
const result = Object.keys(permissions).reduce((previous, key) => {
return permissions[key]
? previous + Number(hexToNumber(LSP6_DEFAULT_PERMISSIONS[key]))
? previous | Number(hexToNumber(LSP6_DEFAULT_PERMISSIONS[key]))
: previous;
}, 0);

Expand Down

0 comments on commit 75ebf9a

Please sign in to comment.