Skip to content

Commit

Permalink
Don't adjust the fee within Server.delegationFee.
Browse files Browse the repository at this point in the history
At this point, the fee should already be correct, and deposits should
already have been accounted for.
  • Loading branch information
jonathanknowles committed Sep 23, 2021
1 parent 5fce388 commit 0c74a44
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/core/src/Cardano/Wallet/Api/Server.hs
Expand Up @@ -579,7 +579,6 @@ import qualified Cardano.Wallet.Primitive.AddressDerivation.Byron as Byron
import qualified Cardano.Wallet.Primitive.AddressDerivation.Icarus as Icarus
import qualified Cardano.Wallet.Primitive.CoinSelection.Balance as Balance
import qualified Cardano.Wallet.Primitive.Types as W
import qualified Cardano.Wallet.Primitive.Types.Coin as Coin
import qualified Cardano.Wallet.Primitive.Types.TokenBundle as TokenBundle
import qualified Cardano.Wallet.Primitive.Types.Tx as W
import qualified Cardano.Wallet.Primitive.Types.UTxO as UTxO
Expand Down Expand Up @@ -2185,10 +2184,10 @@ delegationFee ctx (ApiT wid) = do
txCtx :: TransactionCtx
txCtx = defaultTransactionCtx

runSelection wrk deposit wal =
runSelection wrk _deposit wal =
W.selectAssets @_ @s @k wrk wal txCtx [] calcFee
where
calcFee _ = Coin.distance deposit . selectionDelta TokenBundle.getCoin
calcFee _ = selectionDelta TokenBundle.getCoin

quitStakePool
:: forall ctx s n k.
Expand Down

0 comments on commit 0c74a44

Please sign in to comment.