Skip to content

Commit

Permalink
refactor: fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Unisay committed Nov 30, 2022
1 parent 7c4feb7 commit d4dcab7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/wallet/api/http/Cardano/Wallet/Api/Http/Shelley/Server.hs
Expand Up @@ -1743,7 +1743,7 @@ selectCoinsForJoin ctx knownPools getPoolStatus pid wid = do
$ W.readRewardAccount db wid

let deposits = case action of
JoinRegsteringKey _poolId -> [W.stakeKeyDeposit pp]
JoinRegisteringKey _poolId -> [W.stakeKeyDeposit pp]
Join _poolId -> []
Quit -> []

Expand Down Expand Up @@ -2420,7 +2420,7 @@ constructTransaction
(_, _, rewardPath) <- liftHandler $ W.readRewardAccount @n db walletId

let deposits = case txDelegationAction transactionCtx2 of
Just (JoinRegsteringKey _poolId) -> [W.stakeKeyDeposit pp]
Just (JoinRegisteringKey _poolId) -> [W.stakeKeyDeposit pp]
_ -> []

let refunds = case txDelegationAction transactionCtx2 of
Expand Down Expand Up @@ -4123,7 +4123,7 @@ mkApiCoinSelection deps refunds mcerts metadata unsignedTx =
case action of
Join pid -> pure $ Api.JoinPool apiStakePath (ApiT pid)
Quit -> pure $ Api.QuitPool apiStakePath
JoinRegsteringKey pid -> NE.fromList
JoinRegisteringKey pid -> NE.fromList
[ Api.RegisterRewardAccount apiStakePath
, Api.JoinPool apiStakePath (ApiT pid)
]
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/src/Cardano/Wallet.hs
Expand Up @@ -2361,7 +2361,7 @@ selectAssets ctx era pp params transform = do
_ -> 0
, certificateDepositsTaken =
case params ^. #txContext . #txDelegationAction of
Just (JoinRegsteringKey _) -> 1
Just (JoinRegisteringKey _) -> 1
_ -> 0
, collateralRequirement =
params ^. #txContext . #txCollateralRequirement
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/src/Cardano/Wallet/Delegation.hs
Expand Up @@ -150,7 +150,7 @@ joinStakePoolDelegationAction
pure $
if stakeKeyIsRegistered
then Join poolId
else JoinRegsteringKey poolId
else JoinRegisteringKey poolId

guardJoin
:: Set PoolId
Expand Down
4 changes: 2 additions & 2 deletions lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs
Expand Up @@ -726,7 +726,7 @@ mkDelegationCertificates da accXPub =
case da of
Join poolId ->
[ toStakePoolDlgCert accXPub poolId ]
JoinRegsteringKey poolId ->
JoinRegisteringKey poolId ->
[ toStakeKeyRegCert accXPub
, toStakePoolDlgCert accXPub poolId
]
Expand Down Expand Up @@ -1859,7 +1859,7 @@ estimateTxSize era skeleton =
= case txDelegationAction of
Nothing ->
0
Just JoinRegsteringKey{} ->
Just JoinRegisteringKey{} ->
sizeOf_SmallUInt
+ sizeOf_SmallArray
+ sizeOf_StakeRegistration
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/src/Cardano/Wallet/Transaction.hs
Expand Up @@ -430,7 +430,7 @@ defaultTransactionCtx = TransactionCtx
-- | User-requested action related to a delegation
-- that is taken into account when constructing a transaction.
data DelegationAction
= JoinRegsteringKey PoolId
= JoinRegisteringKey PoolId
-- ^ Join stake pool, registering stake key.
| Join PoolId
-- ^ Join stake pool, assuming that stake key has been registered before.
Expand Down
Expand Up @@ -3511,7 +3511,7 @@ balanceTransactionGoldenSpec = describe "balance goldens" $ do
mw = SomeMnemonic $ either (error . show) id
(entropyToMnemonic @12 <$> mkEntropy "0000000000000001")
rootK = Shelley.unsafeGenerateKeyFromSeed (mw, Nothing) mempty
delegationAction = JoinRegsteringKey poolId
delegationAction = JoinRegisteringKey poolId
ledgerBody = Babbage.TxBody
{ Babbage.inputs = mempty
, Babbage.collateral = mempty
Expand Down

0 comments on commit d4dcab7

Please sign in to comment.