Skip to content

Commit

Permalink
deal with other certificates on server level
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Nov 30, 2021
1 parent d2b9560 commit 826df8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/core/src/Cardano/Wallet/Api/Server.hs
Expand Up @@ -196,6 +196,7 @@ import Cardano.Wallet.Api.Types
, ApiAccountPublicKey (..)
, ApiActiveSharedWallet (..)
, ApiAddress (..)
, ApiAnyCertificate (..)
, ApiAsset (..)
, ApiBalanceTransactionPostData
, ApiBlockInfo (..)
Expand Down Expand Up @@ -2211,7 +2212,9 @@ decodeTransaction
-> ApiSerialisedTransaction
-> Handler (ApiDecodedTransaction n)
decodeTransaction ctx (ApiT wid) (ApiSerialisedTransaction (ApiT sealed)) = do
let (Tx txid feeM colls inps outs wdrlMap meta vldt, toMint, toBurn, _certs) = decodeTx tl sealed
let (Tx txid feeM colls inps outs wdrlMap meta vldt, toMint, toBurn, allCerts) =
decodeTx tl sealed
let (_delCerts, _poolCerts, otherCerts) = allCerts
(txinsOutsPaths, collsOutsPaths, outsPath, acct) <-
withWorkerCtx ctx wid liftE liftE $ \wrk -> do
(acct, _, _) <- liftHandler $ W.readRewardAccount @_ @s @k @n wrk wid
Expand All @@ -2228,7 +2231,7 @@ decodeTransaction ctx (ApiT wid) (ApiSerialisedTransaction (ApiT sealed)) = do
, withdrawals = map (toWrdl acct) $ Map.assocs wdrlMap
, assetsMinted = ApiT toMint
, assetsBurned = ApiT toBurn
, certificates = []
, certificates = map toOtherCerts otherCerts
, metadata = ApiTxMetadata $ ApiT <$> meta
, scriptValidity = ApiT <$> vldt
}
Expand Down Expand Up @@ -2261,6 +2264,7 @@ decodeTransaction ctx (ApiT wid) (ApiSerialisedTransaction (ApiT sealed)) = do
ApiWithdrawalGeneral (ApiT rewardKey, Proxy @n) (Quantity $ fromIntegral c) Our
else
ApiWithdrawalGeneral (ApiT rewardKey, Proxy @n) (Quantity $ fromIntegral c) External
toOtherCerts = OtherCertificate . ApiT

joinStakePool
:: forall ctx s n k.
Expand Down

0 comments on commit 826df8b

Please sign in to comment.