Gofmt
This commit is contained in:
parent
e0b5398098
commit
ee574908d4
@ -71,4 +71,3 @@ func LoadConfig() error {
|
||||
CheckAliasURL, _ = url.JoinPath(dataURLBase, AliasPrefix)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
20
event/msg.go
20
event/msg.go
@ -8,12 +8,12 @@ import (
|
||||
const (
|
||||
// TODO: integrate with sarafu-vise-events
|
||||
EventTokenTransferTag = "TOKEN_TRANSFER"
|
||||
EventTokenMintTag = "TOKEN_MINT"
|
||||
EventRegistrationTag = "CUSTODIAL_REGISTRATION"
|
||||
EventTokenMintTag = "TOKEN_MINT"
|
||||
EventRegistrationTag = "CUSTODIAL_REGISTRATION"
|
||||
)
|
||||
|
||||
type Msg struct {
|
||||
Typ string
|
||||
Typ string
|
||||
Item any
|
||||
}
|
||||
|
||||
@ -26,17 +26,17 @@ type EventCustodialRegistration struct {
|
||||
|
||||
// fields used for handling token transfer event.
|
||||
type EventTokenTransfer struct {
|
||||
To string
|
||||
Value int
|
||||
To string
|
||||
Value int
|
||||
VoucherAddress string
|
||||
TxHash string
|
||||
From string
|
||||
TxHash string
|
||||
From string
|
||||
}
|
||||
|
||||
type EventTokenMint struct {
|
||||
To string
|
||||
Value int
|
||||
TxHash string
|
||||
To string
|
||||
Value int
|
||||
TxHash string
|
||||
VoucherAddress string
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
|
||||
"git.defalsify.org/vise.git/logging"
|
||||
dataserviceapi "github.com/grassrootseconomics/ussd-data-service/pkg/api"
|
||||
"git.grassecon.net/grassrootseconomics/sarafu-api/models"
|
||||
dataserviceapi "github.com/grassrootseconomics/ussd-data-service/pkg/api"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -14,52 +14,50 @@ var (
|
||||
|
||||
const (
|
||||
AliceChecksum = "0xeae046BF396e91f5A8D74f863dC57c107c8a4a70"
|
||||
BobChecksum = "0xB3117202371853e24B725d4169D87616A7dDb127"
|
||||
AliceSession = "5553425"
|
||||
BobChecksum = "0xB3117202371853e24B725d4169D87616A7dDb127"
|
||||
AliceSession = "5553425"
|
||||
)
|
||||
|
||||
type MockApi struct {
|
||||
TransactionsContent []dataserviceapi.Last10TxResponse
|
||||
VouchersContent []dataserviceapi.TokenHoldings
|
||||
VoucherDataContent *models.VoucherDataResult
|
||||
VouchersContent []dataserviceapi.TokenHoldings
|
||||
VoucherDataContent *models.VoucherDataResult
|
||||
}
|
||||
|
||||
func(m MockApi) CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResult, error) {
|
||||
func (m MockApi) CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResult, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func(m MockApi) CreateAccount(ctx context.Context) (*models.AccountResult, error) {
|
||||
func (m MockApi) CreateAccount(ctx context.Context) (*models.AccountResult, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func(m MockApi) TrackAccountStatus(ctx context.Context, publicKey string) (*models.TrackStatusResult, error) {
|
||||
func (m MockApi) TrackAccountStatus(ctx context.Context, publicKey string) (*models.TrackStatusResult, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func(m MockApi) FetchVouchers(ctx context.Context, publicKey string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
func (m MockApi) FetchVouchers(ctx context.Context, publicKey string) ([]dataserviceapi.TokenHoldings, error) {
|
||||
logg.DebugCtxf(ctx, "mockapi fetchvouchers", "key", publicKey)
|
||||
return m.VouchersContent, nil
|
||||
}
|
||||
|
||||
func(m MockApi) FetchTransactions(ctx context.Context, publicKey string) ([]dataserviceapi.Last10TxResponse, error) {
|
||||
func (m MockApi) FetchTransactions(ctx context.Context, publicKey string) ([]dataserviceapi.Last10TxResponse, error) {
|
||||
logg.DebugCtxf(ctx, "mockapi fetchtransactions", "key", publicKey)
|
||||
return m.TransactionsContent, nil
|
||||
}
|
||||
|
||||
func(m MockApi) VoucherData(ctx context.Context, address string) (*models.VoucherDataResult, error) {
|
||||
func (m MockApi) VoucherData(ctx context.Context, address string) (*models.VoucherDataResult, error) {
|
||||
return m.VoucherDataContent, nil
|
||||
}
|
||||
|
||||
func(m MockApi) CheckAliasAddress(ctx context.Context, alias string) (*models.AliasAddress, error) {
|
||||
func (m MockApi) CheckAliasAddress(ctx context.Context, alias string) (*models.AliasAddress, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func(m MockApi) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) {
|
||||
func (m MockApi) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func(m MockApi) TokenTransfer(ctx context.Context, amount, from, to, tokenAddress string) (*models.TokenTransferResponse, error) {
|
||||
func (m MockApi) TokenTransfer(ctx context.Context, amount, from, to, tokenAddress string) (*models.TokenTransferResponse, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ func (m *MockAccountService) CheckAliasAddress(ctx context.Context, alias string
|
||||
return args.Get(0).(*models.AliasAddress), args.Error(1)
|
||||
}
|
||||
|
||||
func(m MockAccountService) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) {
|
||||
func (m MockAccountService) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error) {
|
||||
args := m.Called(publicKey, hint)
|
||||
return args.Get(0).(*models.RequestAliasResult), args.Error(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user