Expose methods required for the stream sync service #147
@ -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 {
|
||||
|
@ -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")
|
||||
|
@ -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"`
|
||||
|
@ -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"`
|
||||
|
@ -1 +0,0 @@
|
||||
package models
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user