Skip to content

Commit

Permalink
Merge pull request #18 from GenerationSoftware/gen-592-clean-up-remai…
Browse files Browse the repository at this point in the history
…ning-casting-in-twab-controller

Removed some type casting detritus
  • Loading branch information
asselstine authored Aug 30, 2023
2 parents 7c62ba6 + 4bf8870 commit e81e29c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 61 deletions.
2 changes: 1 addition & 1 deletion src/TwabController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ contract TwabController {
_vault,
_currentDelegate,
_to,
SafeCast.toUint96(userObservations[_vault][_from].details.balance)
SafeCast.toUint112(userObservations[_vault][_from].details.balance)
);

emit Delegated(_vault, _from, to);
Expand Down
57 changes: 0 additions & 57 deletions src/libraries/OverflowSafeComparatorLib.sol

This file was deleted.

3 changes: 0 additions & 3 deletions src/libraries/TwabLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ pragma solidity ^0.8.19;

import "ring-buffer-lib/RingBufferLib.sol";

import { SafeCast } from "openzeppelin/utils/math/SafeCast.sol";
import "./OverflowSafeComparatorLib.sol";
import { ObservationLib, MAX_CARDINALITY } from "./ObservationLib.sol";

/// @notice Emitted when a balance is decreased by an amount that exceeds the amount available.
Expand Down Expand Up @@ -49,7 +47,6 @@ error InsufficientHistory(uint48 requestedTimestamp, uint48 oldestTimestamp);
* within safe boundaries.
*/
library TwabLib {
using OverflowSafeComparatorLib for uint32;

/**
* @notice Struct ring buffer parameters for single user Account.
Expand Down

0 comments on commit e81e29c

Please sign in to comment.