Skip to content

Commit

Permalink
Fix go simulate request generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpaulos committed Sep 14, 2023
1 parent 59df35e commit 4f5c81a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go_templates/query.vm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"github.com/algorand/go-algorand-sdk/v2/types"
#end
#foreach( $qp in $q.bodyParameters)
#if( $str.matches("#oapiToGo($qp)", "models\..*") && $queryType != "SimulateTransaction" )
#if( $str.matches("#oapiToGo($qp)", "models\..*") )
"github.com/algorand/go-algorand-sdk/v2/encoding/msgpack"
#end
#end
Expand Down Expand Up @@ -279,7 +279,7 @@ func (s *${queryType}) Do(ctx context.Context, headers ...*common.Header) (respo
}
#elseif( $queryType == "SimulateTransaction" )
func (s *${queryType}) Do(ctx context.Context, headers ...*common.Header) (response $returnType, err error) {
err = s.c.post(ctx, &response, $processedPath, s.p, headers, s.request)
err = s.c.post(ctx, &response, $processedPath, s.p, headers, msgpack.Encode(&s.request))
return
}
#elseif( $queryType == "GetTransactionGroupLedgerStateDeltasForRound" )
Expand Down

0 comments on commit 4f5c81a

Please sign in to comment.