Skip to content

Commit

Permalink
fix: key retention was check incorrectly (#50)
Browse files Browse the repository at this point in the history
* fix a small but critical bug

* Update move/axelar_gateway/sources/auth.move

---------

Co-authored-by: Milap Sheth <[email protected]>
  • Loading branch information
Foivos and milapsheth authored Jun 5, 2024
1 parent 920616a commit d2fba53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion move/axelar_gateway/sources/auth.move
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module axelar_gateway::auth {
let current_epoch = self.epoch;
let is_latest_signers = current_epoch == signers_epoch;

assert!(signers_epoch == 0 || (current_epoch - signers_epoch) >= PREVIOUS_KEY_RETENTION, EInvalidEpoch);
assert!(signers_epoch != 0 && (current_epoch - signers_epoch) <= PREVIOUS_KEY_RETENTION, EInvalidEpoch);

let message = MessageToSign {
domain_separator: self.domain_separator,
Expand Down

0 comments on commit d2fba53

Please sign in to comment.