From 4f5c81aeb2b9fb6b9cfbd0847dc89e4f98c9f807 Mon Sep 17 00:00:00 2001 From: Jason Paulos Date: Thu, 14 Sep 2023 11:44:00 -0400 Subject: [PATCH] Fix go simulate request generation --- go_templates/query.vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go_templates/query.vm b/go_templates/query.vm index 4f4abc8..f8524bd 100644 --- a/go_templates/query.vm +++ b/go_templates/query.vm @@ -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 @@ -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" )