You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(settlement-client): do not convert scale
The scale conversion will be performed on the engine. We must send our asset scale to the engine so that it knows how to handle the number we sent it.
* feat(settlement): Implement asset scale conversion for u256
* feat(settlement): Normalize the amount properly when being notified by the engine
* fix(eth-se): Scale the amount to settle for based on the body and engine scale
If we have configured the engine with asset scale 18, and the connector sends a body with scale 9 and amount 1, we should settle for 1e9
* test(eth-se): adjust test for proper scale conversion
* test(eth-xrp) Set ETHXRP exchange rate
* fix(crate): Remove settlement_engine_asset_scale from account
* improvement(settlement/engines): use BigUInt to handle big numbers
* fix(settlement): Convert asset scale properly
Previously the Convert trait implementation had an arithmetic error,
which was forcing us to use provide it parameters in the opposite order.
* feat(settlement/engine): Return None when idempotent data not found instead of Error
* fix(settlement): Make asset scale conversions overflow-safe
- If exchange rate normalization fails return a reject packet
- In all other places we use BigUint so the conversion should never fail,
but we still handle the error graciously
- prefer shadwing of variable name to avoid using the wrong variable
- clarify comment about SettlementEngineDetails
* improvement(exchange-rate): make the scale conversion after the exchange rate is applied
* test(exchange-rate): Add tests which verify that rate conversions fail correctly
0 commit comments