On TradingService#getVolumeForOrder null check volume and use currency.base scale instead of USD scale #365

Merged
dazito merged 3 commits from getVolumeFor-fix-rounding-issue-when-volume-is-null into master 2021-03-16 15:00:08 -07:00
dazito commented 2021-03-14 06:07:06 -07:00 (Migrated from github.com)

In some cases the volume may be null and a NPE is thrown. To avoid that we do a null check before comparing the value of volume.

If volume is null we fallback to getting the amount of currency base we have in our account. The issue is here, before this PR we would always use USD scale, even for crypto currencies.

In some cases the `volume` may be null and a NPE is thrown. To avoid that we do a null check before comparing the value of `volume`. If `volume` is null we fallback to getting the amount of currency base we have in our account. The issue is here, before this PR we would always use USD scale, even for crypto currencies.
scionaltera (Migrated from github.com) approved these changes 2021-03-16 14:59:38 -07:00
Commenting is not possible because the repository is archived.
No description provided.