API Update tokens endpoint

This commit is contained in:
laisolizq
2020-10-26 18:53:17 +01:00
parent b320069e75
commit bc34f3456b
9 changed files with 303 additions and 302 deletions

View File

@@ -80,20 +80,20 @@ type txWrite struct {
Nonce *common.Nonce `meddler:"nonce"`
}
// TokenRead add USD info to common.Token
type TokenRead struct {
ItemID int `meddler:"item_id"`
TokenID common.TokenID `meddler:"token_id"`
EthBlockNum int64 `meddler:"eth_block_num"` // Ethereum block number in which this token was registered
EthAddr ethCommon.Address `meddler:"eth_addr"`
Name string `meddler:"name"`
Symbol string `meddler:"symbol"`
Decimals uint64 `meddler:"decimals"`
USD *float64 `meddler:"usd"`
USDUpdate *time.Time `meddler:"usd_update,utctime"`
TotalItems int `meddler:"total_items"`
FirstItem int `meddler:"first_item"`
LastItem int `meddler:"last_item"`
// TokenWithUSD add USD info to common.Token
type TokenWithUSD struct {
ItemID int `json:"itemId" meddler:"item_id"`
TokenID common.TokenID `json:"id" meddler:"token_id"`
EthBlockNum int64 `json:"ethereumBlockNum" meddler:"eth_block_num"` // Ethereum block number in which this token was registered
EthAddr ethCommon.Address `json:"ethereumAddress" meddler:"eth_addr"`
Name string `json:"name" meddler:"name"`
Symbol string `json:"symbol" meddler:"symbol"`
Decimals uint64 `json:"decimals" meddler:"decimals"`
USD *float64 `json:"USD" meddler:"usd"`
USDUpdate *time.Time `json:"fiatUpdate" meddler:"usd_update,utctime"`
TotalItems int `json:"-" meddler:"total_items"`
FirstItem int `json:"-" meddler:"first_item"`
LastItem int `json:"-" meddler:"last_item"`
}
// HistoryExit is a representation of a exit with additional information