added FetchVouchers to the TestAccountService

This commit is contained in:
Alfred Kamanda 2024-10-19 16:07:40 +03:00
parent aced3e4fc3
commit 3bf2045f15
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -132,7 +132,6 @@ func (tas *TestAccountService) CreateAccount() (*models.AccountResponse, error)
}
func (tas *TestAccountService) CheckBalance(publicKey string) (*models.BalanceResponse, error) {
balanceResponse := &models.BalanceResponse{
Ok: true,
Result: struct {
@ -170,3 +169,31 @@ func (tas *TestAccountService) CheckAccountStatus(trackingId string) (*models.Tr
}
return trackResponse, nil
}
func (tas *TestAccountService) FetchVouchers(publicKey string) (*models.VoucherHoldingResponse, error) {
return &models.VoucherHoldingResponse{
Ok: true,
Result: struct {
Holdings []struct {
ContractAddress string `json:"contractAddress"`
TokenSymbol string `json:"tokenSymbol"`
TokenDecimals string `json:"tokenDecimals"`
Balance string `json:"balance"`
} `json:"holdings"`
}{
Holdings: []struct {
ContractAddress string `json:"contractAddress"`
TokenSymbol string `json:"tokenSymbol"`
TokenDecimals string `json:"tokenDecimals"`
Balance string `json:"balance"`
}{
{
ContractAddress: "0x6CC75A06ac72eB4Db2eE22F781F5D100d8ec03ee",
TokenSymbol: "SRF",
TokenDecimals: "6",
Balance: "2745987",
},
},
},
}, nil
}