Add get tokens endpoint

This commit is contained in:
laisolizq
2020-10-15 18:58:24 +02:00
parent 98255b99be
commit 043710112d
12 changed files with 338 additions and 46 deletions

View File

@@ -51,7 +51,8 @@ func TestPriceUpdater(t *testing.T) {
// Update prices
pu.UpdatePrices()
// Check that prices have been updated
fetchedTokens, err := historyDB.GetTokens()
limit := uint(10)
fetchedTokens, _, err := historyDB.GetTokens(nil, nil, "", nil, &limit, historydb.OrderAsc)
assert.NoError(t, err)
for _, token := range fetchedTokens {
assert.NotNil(t, token.USD)