reverse sign of amount for sell and buy in app/models/binance_account/processor.rb#1451
reverse sign of amount for sell and buy in app/models/binance_account/processor.rb#1451IamTaoChen wants to merge 1 commit intowe-promise:mainfrom
app/models/binance_account/processor.rb#1451Conversation
📝 WalkthroughWalkthroughUpdated USD amount sign handling for Binance spot trades in the processor module. Buyer entries now record positive amounts while seller entries record negative amounts, reversing the previous sign convention. Other trade-processing logic remains unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/models/binance_account/processor.rb (1)
175-196:⚠️ Potential issue | 🟠 MajorBackfill existing Binance spot entries before flipping the sign.
This only fixes newly created rows. Previously imported spot trades keep the old convention because
fetch_new_tradesonly requests ids after the cached max trade id, andexternal_idskips any existing entry. Existing Binance users will therefore keep inverted historical inflow/outflow and balance data unless this ships with a reimport or data backfill path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 45e462af-d2ad-4c0a-bee1-32418dd4b091
📒 Files selected for processing (1)
app/models/binance_account/processor.rb
|
Can you review @boul2gom? 🙏 |
app/models/binance_account/processor.rb
Summary by CodeRabbit