Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Oct 10, 2023
1 parent f06f298 commit 7aa6065
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions vms/avm/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,18 @@ func (s *Service) GetTx(_ *http.Request, args *api.GetTxArgs, reply *api.GetTxRe

var result any
if args.Encoding == formatting.JSON {
err := tx.Unsigned.Visit(&txInit{
err = tx.Unsigned.Visit(&txInit{
tx: tx,
ctx: s.vm.ctx,
typeToFxIndex: s.vm.typeToFxIndex,
fxs: s.vm.fxs,
})
if err != nil {
return err
}
result = tx
} else {
result, err = formatting.Encode(args.Encoding, tx.Bytes())
if err != nil {
return fmt.Errorf("couldn't encode tx as string: %w", err)
}
}
if err != nil {
return err
}

reply.Tx, err = stdjson.Marshal(result)
Expand Down

0 comments on commit 7aa6065

Please sign in to comment.