test: migrate e2e/auth to system tests and fix sign-batch (#22149)
This commit is contained in:
@@ -13,6 +13,26 @@ type Account interface {
|
||||
GetSequence() uint64
|
||||
}
|
||||
|
||||
type mockAccount struct {
|
||||
addr []byte
|
||||
}
|
||||
|
||||
func (m mockAccount) GetAddress() sdk.AccAddress {
|
||||
return m.addr
|
||||
}
|
||||
|
||||
func (m mockAccount) GetPubKey() cryptotypes.PubKey {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m mockAccount) GetAccountNumber() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m mockAccount) GetSequence() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// AccountRetriever defines the interfaces required by transactions to
|
||||
// ensure an account exists and to be able to query for account fields necessary
|
||||
// for signing.
|
||||
@@ -32,8 +52,8 @@ type MockAccountRetriever struct {
|
||||
ReturnAccNum, ReturnAccSeq uint64
|
||||
}
|
||||
|
||||
func (mar MockAccountRetriever) GetAccount(_ Context, _ sdk.AccAddress) (Account, error) {
|
||||
return nil, nil
|
||||
func (mar MockAccountRetriever) GetAccount(_ Context, address sdk.AccAddress) (Account, error) {
|
||||
return mockAccount{addr: address}, nil
|
||||
}
|
||||
|
||||
func (mar MockAccountRetriever) GetAccountWithHeight(_ Context, _ sdk.AccAddress) (Account, int64, error) {
|
||||
|
||||
Reference in New Issue
Block a user