Skip to content

Commit

Permalink
Merge pull request #266 from blockfrost/chore/fix-typo
Browse files Browse the repository at this point in the history
fix: evaluate endpoints
  • Loading branch information
vladimirvolek authored Apr 18, 2023
2 parents 246448b + 2a060b2 commit c281d1d
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 110 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.3.1]

### Fixed

- `utilsTxsEvaluate`, `utilsTxsEvaluateUtxos` methods

## [5.3.0] - 2023-04-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blockfrost/blockfrost-js",
"version": "5.3.0",
"version": "5.3.1",
"description": "A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API",
"keywords": [
"blockfrost",
Expand Down
8 changes: 4 additions & 4 deletions src/endpoints/api/utils/txs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export async function utilsTxsEvaluate(
this: BlockFrostAPI,
transaction: Uint8Array | string,
): Promise<paths['/utils/txs/evaluate']['post']['responses']['200']> {
let tx: Buffer;
let tx: string;

if (typeof transaction === 'string') {
tx = Buffer.from(transaction, 'hex');
tx = transaction;
} else {
tx = Buffer.from(transaction);
tx = Buffer.from(transaction).toString('hex');
}

return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -69,7 +69,7 @@ export async function utilsTxsEvaluateUtxos(
cbor: transaction,
additionalUtxoSet,
}),
headers: { 'Content-type': 'application/cbor' },
headers: { 'Content-type': 'application/json' },
},
)
.then(resp => {
Expand Down
Loading

0 comments on commit c281d1d

Please sign in to comment.