Skip to content

Commit

Permalink
use same struct in mock response (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG authored Jan 9, 2024
1 parent 88d6e76 commit 5caa538
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions client/mockserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,9 @@ func (em *MockserverClient) SetAnyValuePath(path string, v interface{}) error {
Id: id,
Request: HttpRequest{Path: path},
Response: HttpResponse{
Body: struct {
Id string
Data struct {
Result interface{}
}
Error interface{}
}{
Body: AdapterResponse{
Id: "",
Data: struct {
Result interface{}
}{
Data: AdapterResult{
Result: v,
},
Error: nil,
Expand Down Expand Up @@ -240,7 +232,7 @@ type ContractInfoJSON struct {

// AdapterResult represents an int result for an adapter
type AdapterResult struct {
Result int `json:"result"`
Result interface{} `json:"result"`
}

// AdapterResponse represents a response from an adapter
Expand Down

0 comments on commit 5caa538

Please sign in to comment.