We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6e254b commit 7871532Copy full SHA for 7871532
contracts/TWA.vy
@@ -107,9 +107,9 @@ def _take_snapshot(_value: uint256):
107
@notice Stores a snapshot of the tracked value.
108
@param _value The value to store.
109
"""
110
- if (len(self.snapshots) == 0) or ( # First snapshot
+ if ( # First snapshot
111
self.last_snapshot_timestamp + self.min_snapshot_dt_seconds <= block.timestamp # after dt
112
- ):
+ ) or (len(self.snapshots) == 0):
113
self.last_snapshot_timestamp = block.timestamp
114
self.snapshots.append(
115
Snapshot(tracked_value=_value, timestamp=block.timestamp)
0 commit comments