Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

fix(): fix cgCoinsMap bug #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion services/markets/coingecko/tickers.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func createCgCoinsMap(coins Coins) map[string][]CoinResult {
PotentialCoinID: getCoinId(platform),
}

cgCoinsMap[c.Id] = []CoinResult{cr}
Copy link
Contributor

@vikmeup vikmeup Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you write a unit test for it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little hard to do when writing unit tests?

// need append but not recover
cgCoinsMap[c.Id] = append(cgCoinsMap[c.Id], cr)
}
}

Expand Down