Skip to content

Commit

Permalink
refactor: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchainguyy committed Nov 1, 2023
1 parent e9df59d commit acb0b1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tenderly-suite/role-update-action/role-update/roleUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const handleRoleUpdate = async (context, event) => {

for (const log of event.logs) {
if (log.topics[0] === TOPIC_0_ROLES_ADDED || log.topics[0] === TOPIC_0_ROLES_REMOVED) {
if(log.data.length < 130){
if (log.data.length < 130) {
throw new Error('INVALID_LOG_DATA_LENGTH');
}

Expand All @@ -35,11 +35,11 @@ const handleRoleUpdate = async (context, event) => {
roles.push(getRole(parseInt(log.data.substring(subIndex - 2, subIndex), 16)));
}

if(log.topics.length === 0){
if (log.topics.length === 0) {
throw new Error('INVALID_LOG_TOPICS_LENGTH');
}

if(log.topics[1].length < 26 + 40){
if (log.topics[1].length < 26 + 40) {
throw new Error('INVALID_LOG_TOPIC_LENGTH');
}

Expand Down

0 comments on commit acb0b1e

Please sign in to comment.