Fix typo in ERC20Snapshot. (#1670)

pull/1678/head
Nicolás Venturo 6 years ago committed by GitHub
parent 4dd8575bb6
commit 4c706480e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      contracts/drafts/ERC20Snapshot.sol

@ -31,7 +31,7 @@ contract ERC20Snapshot is ERC20 {
} }
mapping (address => Snapshots) private _accountBalanceSnapshots; mapping (address => Snapshots) private _accountBalanceSnapshots;
Snapshots private _totalSupplySnaphots; Snapshots private _totalSupplySnapshots;
// Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.
Counters.Counter private _currentSnapshotId; Counters.Counter private _currentSnapshotId;
@ -56,7 +56,7 @@ contract ERC20Snapshot is ERC20 {
} }
function totalSupplyAt(uint256 snapshotId) public view returns(uint256) { function totalSupplyAt(uint256 snapshotId) public view returns(uint256) {
(bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnaphots); (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);
return snapshotted ? value : totalSupply(); return snapshotted ? value : totalSupply();
} }
@ -118,7 +118,7 @@ contract ERC20Snapshot is ERC20 {
} }
function _updateTotalSupplySnapshot() private { function _updateTotalSupplySnapshot() private {
_updateSnapshot(_totalSupplySnaphots, totalSupply()); _updateSnapshot(_totalSupplySnapshots, totalSupply());
} }
function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {

Loading…
Cancel
Save