From 49dcb779ac28cc529f533956520c8f506f90275e Mon Sep 17 00:00:00 2001 From: RickGriff Date: Mon, 6 May 2024 09:43:53 +0700 Subject: [PATCH] Tidy up comments --- contracts/src/StabilityPool.sol | 11 ++--------- contracts/src/test/stabilityPool.t.sol | 9 +++++---- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/contracts/src/StabilityPool.sol b/contracts/src/StabilityPool.sol index 88451cdb..ba9d3029 100644 --- a/contracts/src/StabilityPool.sol +++ b/contracts/src/StabilityPool.sol @@ -391,6 +391,7 @@ contract StabilityPool is LiquityBase, Ownable, CheckContract, IStabilityPool { assert(getDepositorETHGain(msg.sender) == 0); } + // TODO: Make this also claim BOlD gains when they are implemented function claimAllETHGains() external { // We don't require they have a deposit: they may have stashed gains and no deposit uint256 initialDeposit = deposits[msg.sender].initialValue; @@ -401,7 +402,7 @@ contract StabilityPool is LiquityBase, Ownable, CheckContract, IStabilityPool { // If they have a deposit, update it and update its snapshots if (initialDeposit > 0) { - currentETHGain = getDepositorETHGain(msg.sender); // Only active deposits can only have a current ETH gai + currentETHGain = getDepositorETHGain(msg.sender); // Only active deposits can only have a current ETH gain uint256 compoundedBoldDeposit = getCompoundedBoldDeposit(msg.sender); boldLoss = initialDeposit - compoundedBoldDeposit; // Needed only for event log @@ -419,14 +420,6 @@ contract StabilityPool is LiquityBase, Ownable, CheckContract, IStabilityPool { _sendETHGainToDepositor(ETHToSend); assert(getDepositorETHGain(msg.sender) == 0); } - -// T ODO: should claim both rewards (BOLD and ETH) since it updates snapshots - // -mintAggInterest - // -calc current gains - // -calc new deposit - // -updateDepositAndSnapshots - // -Send (current + stashed) total gains to depositor - // -Zero stashed gains // --- Liquidation functions --- diff --git a/contracts/src/test/stabilityPool.t.sol b/contracts/src/test/stabilityPool.t.sol index 28ba073a..03cce139 100644 --- a/contracts/src/test/stabilityPool.t.sol +++ b/contracts/src/test/stabilityPool.t.sol @@ -582,7 +582,8 @@ contract SPTest is DevTestSetup { } // TODO: -// 1) tests for withdrawETHGainToTrove (if we don't remove it) -// 2) tests claimAllETHGains (requires deposit data & getter refactor): -// - updates recorded deposit value -// - updates deposit snapshots \ No newline at end of file +// 1) claim tests for withdrawETHGainToTrove (if we don't remove it) +// +// 2) tests for claimAllETHGains (requires deposit data & getter refactor): +// - updates recorded deposit value +// - updates deposit snapshots \ No newline at end of file