Merge branch 'master' into api-context

This commit is contained in:
2024-10-24 17:07:11 +03:00
13 changed files with 279 additions and 180 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"git.grassecon.net/urdt/ussd/internal/models"
"github.com/grassrootseconomics/eth-custodial/pkg/api"
"github.com/stretchr/testify/mock"
)
@@ -12,9 +13,9 @@ type MockAccountService struct {
mock.Mock
}
func (m *MockAccountService) CreateAccount(ctx context.Context) (*models.AccountResponse, error) {
func (m *MockAccountService) CreateAccount(ctx context.Context) (*api.OKResponse, error) {
args := m.Called()
return args.Get(0).(*models.AccountResponse), args.Error(1)
return args.Get(0).(*api.OKResponse), args.Error(1)
}
func (m *MockAccountService) CheckBalance(publicKey string,ctx context.Context) (*models.BalanceResponse, error) {
@@ -25,4 +26,9 @@ func (m *MockAccountService) CheckBalance(publicKey string,ctx context.Context)
func (m *MockAccountService) CheckAccountStatus(trackingId string,ctx context.Context) (*models.TrackStatusResponse, error) {
args := m.Called(trackingId)
return args.Get(0).(*models.TrackStatusResponse), args.Error(1)
}
}
func (m *MockAccountService) TrackAccountStatus(publicKey string) (*api.OKResponse, error) {
args := m.Called(publicKey)
return args.Get(0).(*api.OKResponse), args.Error(1)
}