Skip to content

Commit

Permalink
Merge pull request #54 from MIxAxIM/main
Browse files Browse the repository at this point in the history
Fix:ExecutionUnits JSON struct tags and EvaluateTx return type
  • Loading branch information
Vardominator authored Feb 5, 2025
2 parents 24f4fcf + a8fdf2e commit 0ef9947
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (c *Client) TransactionOutputsFromReferences(
func (c *Client) EvaluateTx(
txCbor string,
AdditionalUtxos ...string,
) ([]models.RedeemerEvaluation, error) {
) (models.EvaluateTxResponse, error) {
url := "/transactions/evaluate"
body := models.EvaluateTx{
Cbor: txCbor,
Expand All @@ -176,7 +176,7 @@ func (c *Client) EvaluateTx(
return nil, fmt.Errorf("unexpected error: %d", resp.Body)
}
defer resp.Body.Close()
var redeemerEvals []models.RedeemerEvaluation
var redeemerEvals models.EvaluateTxResponse
err = json.NewDecoder(resp.Body).Decode(&redeemerEvals)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions models/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ type EvaluateTx struct {
}

type ExecutionUnits struct {
Mem int64 `json:"Mem"`
Steps int64 `json:"Steps"`
Mem int64 `json:"mem"`
Steps int64 `json:"steps"`
}

type RedeemerEvaluation struct {
Expand Down

0 comments on commit 0ef9947

Please sign in to comment.