Skip to content

Commit

Permalink
Merge pull request #290 from openmoneymarket/hotfix/omm-v.1.1.5.1
Browse files Browse the repository at this point in the history
hotfix/omm v.1.1.5.1
  • Loading branch information
redlarva authored Feb 21, 2022
2 parents 43d7f71 + c3a971f commit 0eaa7ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion score/ommToken/snapshot/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _createSnapshot(self, _owner: Address, _user_old_staked_balance: int, _user_
"""
_now = self.now()
self._snapshot.create_checkpoints(_owner, _now, _user_new_staked_balance)
self._snapshot.create_total_checkpoints(_now, _user_new_staked_balance)
self._snapshot.create_total_checkpoints(_now, _total_staked_balance)

self.SnapshotCreated(_owner, _user_new_staked_balance, _user_old_staked_balance)

Expand Down
5 changes: 5 additions & 0 deletions score/ommToken/tokens/IRC2.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,8 @@ def _mint(self, _to: Address, _amount: int, _data: bytes = None) -> None:
self._balances[_to] += _amount

self.Transfer(ZERO_SCORE_ADDRESS, _to, _amount, _data)

@external
@only_owner
def updateTotalStakedBalanceOfAt(self, _timestamp: int, _staked: int):
self._snapshot.create_total_checkpoints(_timestamp, _staked)

0 comments on commit 0eaa7ab

Please sign in to comment.