Skip to content

Commit

Permalink
fix: More testing
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Apr 5, 2024
1 parent 5e7179d commit 496cacf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@erc725/erc725.js",
"version": "0.24.1-dev.3",
"version": "0.24.1-dev.4",
"description": "Library to interact with ERC725 smart contracts",
"main": "build/main/src/index.js",
"typings": "build/main/src/index.d.ts",
Expand Down
17 changes: 6 additions & 11 deletions src/lib/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@ export function encodePermissions(permissions: Permissions): string {
const permissionValue = BigInt(
hexToNumber(LSP6_DEFAULT_PERMISSIONS[key], true),
);
console.log(
'update',
key,
permissions[key],
permissionValue,
basePermissions,
);
if (permissions[key]) {
basePermissions |= permissionValue;
} else {
basePermissions = basePermissions & ~permissionValue;
if (key in permissions) {
if (permissions[key]) {
basePermissions |= permissionValue;
} else {
basePermissions &= ~permissionValue;
}
}
}
// Convert the final BigInt permission value back to a hex string, properly padded
Expand Down

0 comments on commit 496cacf

Please sign in to comment.