fix account subscription missing data
This commit is contained in:
parent
66e0575af9
commit
b78592564e
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ type AccountResult struct {
|
|||
Slot uint64
|
||||
} `json:"context"`
|
||||
Value struct {
|
||||
Account rpc.Account `json:"account"`
|
||||
rpc.Account
|
||||
} `json:"value"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue