vault: formatting

This commit is contained in:
Mark Spanbroek 2025-02-04 15:08:24 +01:00
parent ee6d56a54b
commit 2600578b48
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ struct Flow {
}
library Flows {
function _totalAt(
function totalAt(
Flow memory flow,
Timestamp timestamp
) internal pure returns (int128) {

View File

@ -51,7 +51,7 @@ abstract contract VaultBase {
if (account.flow.rate != TokensPerSecond.wrap(0)) {
Lock memory lock = _locks[controller][fund];
Timestamp end = Timestamps.earliest(timestamp, lock.expiry);
int128 accumulated = account.flow._totalAt(end);
int128 accumulated = account.flow.totalAt(end);
if (accumulated >= 0) {
account.designated += uint128(accumulated);
} else {
@ -235,7 +235,7 @@ abstract contract VaultBase {
Lock memory lock
) private pure {
if (account.flow.rate < TokensPerSecond.wrap(0)) {
uint128 outgoing = uint128(-account.flow._totalAt(lock.maximum));
uint128 outgoing = uint128(-account.flow.totalAt(lock.maximum));
require(outgoing <= account.available, InsufficientBalance());
}
}