balanceHistory: remove empty currencies from the list, fix typo
This commit is contained in:
parent
95ac05b280
commit
82debaa50e
@ -945,6 +945,7 @@ func (w *Worker) setFiatRateToBalanceHistories(histories BalanceHistories, curre
|
|||||||
|
|
||||||
// GetBalanceHistory returns history of balance for given address
|
// GetBalanceHistory returns history of balance for given address
|
||||||
func (w *Worker) GetBalanceHistory(address string, fromTimestamp, toTimestamp int64, currencies []string, groupBy uint32) (BalanceHistories, error) {
|
func (w *Worker) GetBalanceHistory(address string, fromTimestamp, toTimestamp int64, currencies []string, groupBy uint32) (BalanceHistories, error) {
|
||||||
|
currencies = removeEmpty(currencies)
|
||||||
bhs := make(BalanceHistories, 0)
|
bhs := make(BalanceHistories, 0)
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
addrDesc, _, err := w.getAddrDescAndNormalizeAddress(address)
|
addrDesc, _, err := w.getAddrDescAndNormalizeAddress(address)
|
||||||
@ -1155,7 +1156,7 @@ func (w *Worker) GetBlocks(page int, blocksOnPage int) (*Blocks, error) {
|
|||||||
return r, nil
|
return r, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// removeEmty removes empty strings from a slice
|
// removeEmpty removes empty strings from a slice
|
||||||
func removeEmpty(stringSlice []string) []string {
|
func removeEmpty(stringSlice []string) []string {
|
||||||
var ret []string
|
var ret []string
|
||||||
for _, str := range stringSlice {
|
for _, str := range stringSlice {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user