Expose methods required for the stream sync service #147

Closed
lash wants to merge 34 commits from lash/export-to-term into pre-mock-remove
6 changed files with 0 additions and 34 deletions
Showing only changes of commit dc198215b1 - Show all commits

View File

@ -705,7 +705,6 @@ func (h *Handlers) FetchCustodialBalances(ctx context.Context, sym string, input
}
res.FlagReset = append(res.FlagReset, flag_api_error)
//balance := balanceResponse.Result.Balance
balance := balanceResponse.Balance
switch balanceType {

View File

@ -815,7 +815,6 @@ func TestAuthorize(t *testing.T) {
// Create required mocks
mockDataStore := new(mocks.MockUserDataStore)
mockCreateAccountService := new(mocks.MockAccountService)
//expectedResult := resource.Result{}
mockState := state.NewState(16)
flag_incorrect_pin, _ := fm.GetFlag("flag_incorrect_pin")
flag_account_authorized, _ := fm.GetFlag("flag_account_authorized")

View File

@ -3,14 +3,6 @@ package models
import "encoding/json"
//type BalanceResponse struct {
// Ok bool `json:"ok"`
// Result struct {
// Balance string `json:"balance"`
// Nonce json.Number `json:"nonce"`
// } `json:"result"`
//}
//
type BalanceResult struct {
Balance string `json:"balance"`
Nonce json.Number `json:"nonce"`

View File

@ -4,13 +4,6 @@ import (
"encoding/json"
"time"
)
//type Transaction struct {
// CreatedAt time.Time `json:"createdAt"`
// Status string `json:"status"`
// TransferValue json.Number `json:"transferValue"`
// TxHash string `json:"txHash"`
// TxType string `json:"txType"`
//}
type TrackStatusResult struct {
CreatedAt time.Time `json:"createdAt"`

View File

@ -1 +0,0 @@
package models

View File

@ -18,15 +18,12 @@ var (
)
type AccountServiceInterface interface {
//CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResponse, error)
CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResult, error)
CreateAccount(ctx context.Context) (*models.AccountResult, error)
//CheckAccountStatus(ctx context.Context, trackingId string) (*models.TrackStatusResponse, error)
// TODO: poorly named method seems to be checking transaction
CheckAccountStatus(ctx context.Context, trackingId string) (*models.TrackStatusResult, error)
TrackAccountStatus(ctx context.Context, publicKey string) (*api.OKResponse, error)
FetchVouchers(ctx context.Context, publicKey string) ([]dataserviceapi.TokenHoldings, error)
//FetchVouchers(ctx context.Context, publicKey string) (*api.OKResponse, error)
}
type AccountService struct {
@ -169,19 +166,6 @@ func (as *AccountService) FetchVouchers(ctx context.Context, publicKey string) (
}
return r, nil
//
// file, err := os.Open("sample_tokens.json")
// if err != nil {
// return nil, err
// }
// defer file.Close()
// var holdings models.VoucherHoldingResponse
//
// if err := json.NewDecoder(file).Decode(&holdings); err != nil {
// return nil, err
// }
// return &holdings, nil
}
func doRequest(ctx context.Context, req *http.Request, rcpt any) (*api.OKResponse, error) {