diff --git a/rpc/ws/client_test.go b/rpc/ws/client_test.go index 362582c..8a5760c 100644 --- a/rpc/ws/client_test.go +++ b/rpc/ws/client_test.go @@ -17,8 +17,11 @@ package ws import ( "context" "fmt" + "os" "testing" + "github.com/dfuse-io/solana-go/text" + "github.com/dfuse-io/solana-go" "go.uber.org/zap" @@ -42,7 +45,9 @@ func Test_AccountSubscribe(t *testing.T) { fmt.Println("receive an error: ", err) return } - fmt.Println("data received: ", data.(*AccountResult).Value.Account.Owner) + text.NewEncoder(os.Stdout).Encode(data, nil) + fmt.Println("Owner: ", data.(*AccountResult).Value.Account.Owner) + fmt.Println("data: ", data.(*AccountResult).Value.Account.Data) return } diff --git a/rpc/ws/types.go b/rpc/ws/types.go index 0569225..4b7aca0 100644 --- a/rpc/ws/types.go +++ b/rpc/ws/types.go @@ -63,7 +63,7 @@ type AccountResult struct { Slot uint64 } `json:"context"` Value struct { - Account rpc.Account `json:"account"` + rpc.Account } `json:"value"` }