This commit is contained in:
sunnya97
2018-05-23 22:09:01 -07:00
parent 33492cc070
commit 5d7c3af1b8
29 changed files with 197 additions and 247 deletions
+3 -2
View File
@@ -35,6 +35,7 @@ import (
btypes "github.com/cosmos/cosmos-sdk/examples/basecoin/types"
tests "github.com/cosmos/cosmos-sdk/tests"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
)
var (
@@ -436,11 +437,11 @@ func request(t *testing.T, port, method, path string, payload []byte) (*http.Res
return res, string(output)
}
func getAccount(t *testing.T, sendAddr string) sdk.Account {
func getAccount(t *testing.T, sendAddr string) auth.Account {
// get the account to get the sequence
res, body := request(t, port, "GET", "/accounts/"+sendAddr, nil)
require.Equal(t, http.StatusOK, res.StatusCode, body)
var acc sdk.Account
var acc auth.Account
err := cdc.UnmarshalJSON([]byte(body), &acc)
require.Nil(t, err)
return acc