From 442dbaf173b92aa11a817d668478a049d684f2dc Mon Sep 17 00:00:00 2001 From: Martynas Kazlauskas Date: Mon, 16 Dec 2024 14:15:48 +0200 Subject: [PATCH] fix(cardano-services-client): correct blockfrost tx submit request body it has to be binary, otherwise Blockfrost responds with 400 this bug wasn't caught initially because we're not using BlockfrostTxSubmitProvider in our e2e test suite --- .../src/TxSubmitProvider/BlockfrostTxSubmitProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cardano-services-client/src/TxSubmitProvider/BlockfrostTxSubmitProvider.ts b/packages/cardano-services-client/src/TxSubmitProvider/BlockfrostTxSubmitProvider.ts index 8c964a85849..4f0a2a6a1e3 100644 --- a/packages/cardano-services-client/src/TxSubmitProvider/BlockfrostTxSubmitProvider.ts +++ b/packages/cardano-services-client/src/TxSubmitProvider/BlockfrostTxSubmitProvider.ts @@ -10,7 +10,7 @@ export class BlockfrostTxSubmitProvider extends BlockfrostProvider implements Tx async submitTx({ signedTransaction }: SubmitTxArgs): Promise { // @ todo handle context and resolutions await this.request('tx/submit', { - body: signedTransaction, + body: Buffer.from(signedTransaction, 'hex'), headers: { 'Content-Type': 'application/cbor' }, method: 'POST' });