Skip to content

Commit

Permalink
chore: correct log and var name
Browse files Browse the repository at this point in the history
  • Loading branch information
agparadiso committed Jan 24, 2024
1 parent 0de527b commit 4ee343a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/services/gateway/handlers/functions/allowlist/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ func (o *orm) GetAllowedSenders(offset, limit uint, qopts ...pg.QOpt) ([]common.
return addresses, nil
}

func (o *orm) CreateAllowedSenders(allowedSender []common.Address, qopts ...pg.QOpt) error {
func (o *orm) CreateAllowedSenders(allowedSenders []common.Address, qopts ...pg.QOpt) error {
var valuesPlaceholder []string
for i := 1; i <= len(allowedSender)*2; i += 2 {
for i := 1; i <= len(allowedSenders)*2; i += 2 {
valuesPlaceholder = append(valuesPlaceholder, fmt.Sprintf("($%d, $%d)", i, i+1))
}

Expand All @@ -77,7 +77,7 @@ func (o *orm) CreateAllowedSenders(allowedSender []common.Address, qopts ...pg.Q
VALUES %s ON CONFLICT (allowed_address, router_contract_address) DO NOTHING;`, tableName, strings.Join(valuesPlaceholder, ", "))

var args []interface{}
for _, as := range allowedSender {
for _, as := range allowedSenders {
args = append(args, as, o.routerContractAddress)
}

Expand All @@ -86,7 +86,7 @@ func (o *orm) CreateAllowedSenders(allowedSender []common.Address, qopts ...pg.Q
return err
}

o.lggr.Debugf("Successfully stored allowed sender: %s for routerContractAddress: %s", allowedSender, o.routerContractAddress)
o.lggr.Debugf("Successfully stored allowed senders: %v for routerContractAddress: %s", allowedSenders, o.routerContractAddress)

return nil
}
Expand Down Expand Up @@ -117,7 +117,7 @@ func (o *orm) DeleteAllowedSenders(blockedSenders []common.Address, qopts ...pg.
return err
}

o.lggr.Debugf("Successfully removed blocked senders from the allowed list: %s for routerContractAddress: %s. rowsAffected: %d", blockedSenders, o.routerContractAddress, rowsAffected)
o.lggr.Debugf("Successfully removed blocked senders from the allowed list: %v for routerContractAddress: %s. rowsAffected: %d", blockedSenders, o.routerContractAddress, rowsAffected)

return nil
}

0 comments on commit 4ee343a

Please sign in to comment.