Skip to content

Commit

Permalink
refactor(x/callback): Remove redundant code in SaveCallback (#567)
Browse files Browse the repository at this point in the history
* Update callback.go

* Update CHANGELOG.md
  • Loading branch information
spoo-bar authored May 7, 2024
1 parent 24ab519 commit eacccad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Contains all the PRs that improved the code without changing the behaviors.
### Fixed

### Improvements
- [#567](https://github.com/archway-network/archway/pull/567) - Remove redundant params fetching in SaveCallback

## [v7.0.0](https://github.com/archway-network/archway/releases/tag/v7.0.0)

Expand Down
4 changes: 0 additions & 4 deletions x/callback/keeper/callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ func (k Keeper) SaveCallback(ctx sdk.Context, callback types.Callback) error {
// This is to ensure that if the param value is decreased in the future, before the callback is executed,
// it does not fail with "out of gas" error. it wouldnt be fair for the contract to err out of the callback
// if it wouldnt have been expected to at the time of registration
params, err = k.GetParams(ctx)
if err != nil {
return err
}
callback.MaxGasLimit = params.CallbackGasLimit

return k.Callbacks.Set(ctx, collections.Join3(callback.CallbackHeight, contractAddress.Bytes(), callback.JobId), callback)
Expand Down

0 comments on commit eacccad

Please sign in to comment.