cleaned up models

This commit is contained in:
Alfred Kamanda 2024-11-15 18:50:06 +03:00
parent baeb5e0ccb
commit c8fc32a4e7
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703
6 changed files with 10 additions and 42 deletions

View File

@ -1,6 +1,6 @@
package models
type AccountResult struct {
PublicKey string `json:"publicKey"`
PublicKey string `json:"publicKey"`
TrackingId string `json:"trackingId"`
}

View File

@ -2,7 +2,6 @@ package models
import "encoding/json"
type BalanceResult struct {
Balance string `json:"balance"`
Nonce json.Number `json:"nonce"`

View File

@ -1,18 +0,0 @@
package models
type ApiResponse struct {
OK bool `json:"ok"`
Description string `json:"description"`
Result Result `json:"result"`
}
type Result struct {
Holdings []Holding `json:"holdings"`
}
type Holding struct {
ContractAddress string `json:"contractAddress"`
TokenSymbol string `json:"tokenSymbol"`
TokenDecimals string `json:"tokenDecimals"`
Balance string `json:"balance"`
}

View File

@ -14,5 +14,5 @@ type Transaction struct {
}
type TrackStatusResult struct {
Active bool `json:"active"`
Active bool `json:"active"`
}

View File

@ -0,0 +1,8 @@
package models
type VoucherDataResult struct {
TokenName string `json:"tokenName"`
TokenSymbol string `json:"tokenSymbol"`
TokenDecimals string `json:"tokenDecimals"`
SinkAddress string `json:"sinkAddress"`
}

View File

@ -1,21 +0,0 @@
package models
import dataserviceapi "github.com/grassrootseconomics/ussd-data-service/pkg/api"
//type VoucherHoldingResponse struct {
// Ok bool `json:"ok"`
// Description string `json:"description"`
// Result VoucherResult `json:"result"`
//}
// VoucherResult holds the list of token holdings
type VoucherResult struct {
Holdings []dataserviceapi.TokenHoldings `json:"holdings"`
}
type VoucherDataResult struct {
TokenName string `json:"tokenName"`
TokenSymbol string `json:"tokenSymbol"`
TokenDecimals string `json:"tokenDecimals"`
SinkAddress string `json:"sinkAddress"`
}