fix account subscription missing data

This commit is contained in:
billettc 2020-12-07 13:36:27 -05:00
parent 66e0575af9
commit b78592564e
2 changed files with 7 additions and 2 deletions

View File

@ -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
}

View File

@ -63,7 +63,7 @@ type AccountResult struct {
Slot uint64
} `json:"context"`
Value struct {
Account rpc.Account `json:"account"`
rpc.Account
} `json:"value"`
}