Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
feat(spv-642): fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszos4chain committed Apr 19, 2024
1 parent dd0cf42 commit 08704a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion broadcast/internal/arc/arc_submit_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func appendSubmitTxHeaders(pld *httpclient.HTTPRequest, opts *broadcast.Transact

func decodeSubmitResponseBody(resp *http.Response) (*broadcast.SubmittedTx, error) {
model := &broadcast.SubmittedTx{}
err := arc_utils.DecodeResponseBody(resp.Body, &model)
err := arc_utils.DecodeResponseBody(resp.Body, model)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion broadcast/internal/arc/utils/arc_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/bitcoin-sv/go-broadcast-client/broadcast"
)

func DecodeResponseBody(body io.ReadCloser, resultOutput any) error {
func DecodeResponseBody[T any](body io.ReadCloser, resultOutput *T) error {
err := json.NewDecoder(body).Decode(resultOutput)
if err != nil {
return broadcast.ErrUnableToDecodeResponse
Expand Down

0 comments on commit 08704a1

Please sign in to comment.