diff --git a/models/accountresponse.go b/models/accountresponse.go index 278e0e9..dc8e758 100644 --- a/models/accountresponse.go +++ b/models/accountresponse.go @@ -1,6 +1,6 @@ package models type AccountResult struct { - PublicKey string `json:"publicKey"` + PublicKey string `json:"publicKey"` TrackingId string `json:"trackingId"` } diff --git a/models/balanceresponse.go b/models/balanceresponse.go index b2baa41..88e9ce9 100644 --- a/models/balanceresponse.go +++ b/models/balanceresponse.go @@ -2,7 +2,6 @@ package models import "encoding/json" - type BalanceResult struct { Balance string `json:"balance"` Nonce json.Number `json:"nonce"` diff --git a/models/tokenresponse.go b/models/tokenresponse.go deleted file mode 100644 index d243d93..0000000 --- a/models/tokenresponse.go +++ /dev/null @@ -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"` -} diff --git a/models/trackstatusresponse.go b/models/trackstatusresponse.go index 47d757d..0c3c230 100644 --- a/models/trackstatusresponse.go +++ b/models/trackstatusresponse.go @@ -14,5 +14,5 @@ type Transaction struct { } type TrackStatusResult struct { - Active bool `json:"active"` + Active bool `json:"active"` } diff --git a/models/voucher_data_result.go b/models/voucher_data_result.go new file mode 100644 index 0000000..f04aafe --- /dev/null +++ b/models/voucher_data_result.go @@ -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"` +} diff --git a/models/vouchersresponse.go b/models/vouchersresponse.go deleted file mode 100644 index 8cf3ec6..0000000 --- a/models/vouchersresponse.go +++ /dev/null @@ -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"` -}