Fix tests
This commit is contained in:
parent
13636d3a55
commit
4a37555293
|
@ -110,7 +110,7 @@ func StreamOpenOrders(client *ws.Client) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("received error from programID subscription: %w", err)
|
||||
}
|
||||
res := d.(*ws.ProgramResult)
|
||||
res := d
|
||||
|
||||
var f *AccountFlag
|
||||
err = bin.NewDecoder(res.Value.Account.Data.GetBytes()).Decode(&f)
|
||||
|
|
|
@ -45,10 +45,9 @@ func Test_AccountSubscribe(t *testing.T) {
|
|||
return
|
||||
}
|
||||
text.NewEncoder(os.Stdout).Encode(data, nil)
|
||||
fmt.Println("OpenOrders: ", data.(*AccountResult).Value.Account.Owner)
|
||||
fmt.Println("data: ", data.(*AccountResult).Value.Account.Data)
|
||||
fmt.Println("OpenOrders: ", data.Value.Account.Owner)
|
||||
fmt.Println("data: ", data.Value.Account.Data)
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
func Test_ProgramSubscribe(t *testing.T) {
|
||||
|
@ -72,7 +71,7 @@ func Test_ProgramSubscribe(t *testing.T) {
|
|||
fmt.Println("receive an error: ", err)
|
||||
return
|
||||
}
|
||||
fmt.Println("data received: ", data.(*ProgramResult).Value.Pubkey)
|
||||
fmt.Println("data received: ", data.Value.Pubkey)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -93,7 +92,6 @@ func Test_SlotSubscribe(t *testing.T) {
|
|||
fmt.Println("receive an error: ", err)
|
||||
return
|
||||
}
|
||||
fmt.Println("data received: ", data.(*SlotResult).Parent)
|
||||
fmt.Println("data received: ", data.Parent)
|
||||
return
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue