Skip to content

Commit

Permalink
post rebase fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed May 30, 2023
1 parent 2f5106f commit 419638e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -2897,7 +2897,7 @@ constructSharedTransaction
withdrawal <- case body ^. #withdrawal of
Just SelfWithdraw -> liftIO $
W.mkSelfWithdrawalShared @n
netLayer (txWitnessTagFor @SharedKey) era db
netLayer (txWitnessTagFor @SharedKey) db
_ -> pure NoWithdrawal

let delegationTemplateM = Shared.delegationTemplate $ getState cp
Expand Down
5 changes: 2 additions & 3 deletions lib/wallet/src/Cardano/Wallet.hs
Expand Up @@ -1276,15 +1276,14 @@ mkSelfWithdrawalShared
:: forall n block
. NetworkLayer IO block
-> TxWitnessTag
-> AnyCardanoEra
-> DBLayer IO (SharedState n SharedKey)
-> IO Withdrawal
mkSelfWithdrawalShared netLayer txWitnessTag era db = do
mkSelfWithdrawalShared netLayer txWitnessTag db = do
(rewardAccount, _, derivationPath) <-
readRewardAccount @(SharedState n SharedKey) db
balance <- getCachedRewardAccountBalance netLayer rewardAccount
pp <- currentProtocolParameters netLayer
return $ case checkRewardIsWorthTxCost txWitnessTag pp era balance of
return $ case checkRewardIsWorthTxCost txWitnessTag pp balance of
Left ErrWithdrawalNotBeneficial -> NoWithdrawal
Right () -> WithdrawalSelf rewardAccount derivationPath balance

Expand Down

0 comments on commit 419638e

Please sign in to comment.