mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-04 06:13:09 +00:00
vault: formatting
This commit is contained in:
parent
ee6d56a54b
commit
2600578b48
@ -10,7 +10,7 @@ struct Flow {
|
||||
}
|
||||
|
||||
library Flows {
|
||||
function _totalAt(
|
||||
function totalAt(
|
||||
Flow memory flow,
|
||||
Timestamp timestamp
|
||||
) internal pure returns (int128) {
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user