Skip to content

v1.2.3

Choose a tag to compare

@cursor cursor released this 29 Jun 18:41
· 11 commits to master since this release
ef1cd90

Summary

All code review findings have been addressed, unit tests added, and the CoinGecko API integration has been hardened.

🐛 Bug Fixes

Alert System

  • alert remove now removes all alerts for a given coin
  • Triggered alerts remove only themselves (other alerts for the same coin are preserved)
  • Alert price comparison respects the --currency flag
  • Negative and invalid price/condition inputs are rejected

Portfolio

  • Coin IDs are normalized to lowercase (fixes case-sensitivity duplicates)
  • Negative amount and price values are rejected
  • Zero balances are removed from holdings after a full sell
  • Transaction currency is stored; history view shows the correct symbol

⚡ Performance

  • Portfolio list uses a single batch API call (GetMarketsByIDs)
  • Removed duplicate API call when fetching coin details

🔒 Security

  • ~/.crypto/portfolio.json and alerts.json are written with 0600 file permissions

🛠 Infrastructure

  • Search queries are URL-encoded
  • Added retry/backoff for CoinGecko 429 rate limit responses
  • page / per-page flags validate input (range 1–250)
  • Alert checker has safe start/stop lifecycle; runs only when active alerts exist

✅ Tests

15 new unit tests added across models, service, and utils.

go test ./... -count=1

📦 Installation

go install github.com/mrcnserkan/crypto@v1.2.3