diff --git a/lib/core/src/Cardano/Wallet.hs b/lib/core/src/Cardano/Wallet.hs index 876c9bd7361..69161ca9242 100644 --- a/lib/core/src/Cardano/Wallet.hs +++ b/lib/core/src/Cardano/Wallet.hs @@ -302,6 +302,7 @@ import Cardano.Wallet.Primitive.Types , TransactionInfo (..) , Tx , TxMeta (..) + , TxMetadata , TxOut (..) , TxStatus (..) , UTxO (..) @@ -1566,9 +1567,10 @@ signTx => ctx -> WalletId -> Passphrase "raw" + -> Maybe TxMetadata -> UnsignedTx -> ExceptT ErrSignPayment IO (Tx, TxMeta, UTCTime, SealedTx) -signTx ctx wid pwd (UnsignedTx inpsNE outsNE) = db & \DBLayer{..} -> do +signTx ctx wid pwd md (UnsignedTx inpsNE outsNE) = db & \DBLayer{..} -> do withRootKey @_ @s ctx wid pwd ErrSignPaymentWithRootKey $ \xprv scheme -> do let pwdP = preparePassphrase scheme pwd nodeTip <- withExceptT ErrSignPaymentNetwork $ currentNodeTip nl @@ -1592,7 +1594,6 @@ signTx ctx wid pwd (UnsignedTx inpsNE outsNE) = db & \DBLayer{..} -> do nl = ctx ^. networkLayer @t inps = NE.toList inpsNE outs = NE.toList outsNE - md = Nothing -- no metadata -- | Makes a fully-resolved coin selection for the given set of payments. selectCoinsExternal diff --git a/lib/core/src/Cardano/Wallet/Api/Server.hs b/lib/core/src/Cardano/Wallet/Api/Server.hs index d3a3208003a..ad2433391ce 100644 --- a/lib/core/src/Cardano/Wallet/Api/Server.hs +++ b/lib/core/src/Cardano/Wallet/Api/Server.hs @@ -1224,6 +1224,7 @@ postTransaction postTransaction ctx genChange (ApiT wid) body = do let pwd = coerce $ getApiT $ body ^. #passphrase let outs = coerceCoin <$> (body ^. #payments) + let md = Nothing -- fixme: implement in #2073 let selfRewardCredentials (rootK, pwdP) = (getRawKey $ deriveRewardAccount @k pwdP rootK, pwdP) @@ -1251,7 +1252,7 @@ postTransaction ctx genChange (ApiT wid) body = do pure (selection, credentials) (tx, meta, time, wit) <- withWorkerCtx ctx wid liftE liftE $ \wrk -> liftHandler $ - W.signPayment @_ @s @t @k wrk wid genChange credentials pwd selection + W.signPayment @_ @s @t @k wrk wid genChange credentials pwd md selection withWorkerCtx ctx wid liftE liftE $ \wrk -> liftHandler $ W.submitTx @_ @s @t @k wrk wid (tx, meta, wit) @@ -1528,7 +1529,7 @@ migrateWallet ctx (ApiT wid) migrateData = do forM migration $ \cs -> do (tx, meta, time, wit) <- withWorkerCtx ctx wid liftE liftE - $ \wrk -> liftHandler $ W.signTx @_ @s @t @k wrk wid pwd cs + $ \wrk -> liftHandler $ W.signTx @_ @s @t @k wrk wid pwd Nothing cs withWorkerCtx ctx wid liftE liftE $ \wrk -> liftHandler $ W.submitTx @_ @_ @t wrk wid (tx, meta, wit) liftIO $ mkApiTransaction