Bonfida / dex-v4

Orderbook-based on-chain SPL token swap market
101 stars 32 forks source link

Fix limit price calculation in placeOrder + expose bindings #69

Closed mi-yu closed 2 years ago

mi-yu commented 2 years ago
  1. Expose bindings
  2. Currently, limitPrice is expected to be the UI amount, but BN doesn't support floating point (so BN(1.5) == BN(1)). Logic should first multiply the raw number by decimals, then convert to BN