Skip to content

Commit

Permalink
Fix @marshal util to return proper transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Quexington committed May 6, 2024
1 parent 41b9384 commit ed66cc7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions chia/rpc/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,19 @@ async def rpc_endpoint(self, request: Dict[str, Any], *args, **kwargs) -> Dict[s
new_txs, signing_responses = await self.service.wallet_state_manager.sign_transactions(
tx_records, response.get("signing_responses", []), "signing_responses" in response
)
response["transactions"] = [
TransactionRecord.to_json_dict_convenience(tx, self.service.config) for tx in new_txs
]
response["signing_responses"] = [byte_serialize_clvm_streamable(r).hex() for r in signing_responses]
else:
new_txs = tx_records # pragma: no cover

if request.get("push", push):
await self.service.wallet_state_manager.add_pending_transactions(
new_txs = await self.service.wallet_state_manager.add_pending_transactions(
new_txs, merge_spends=merge_spends, sign=False
)

response["transactions"] = [
TransactionRecord.to_json_dict_convenience(tx, self.service.config) for tx in new_txs
]

# Some backwards compatibility code
if "transaction" in response:
if (
Expand Down

0 comments on commit ed66cc7

Please sign in to comment.