dfinity / exchange-rate-canister

The exchange rate canister (XRC) makes use of the HTTP requests feature to provide exchange rates as a service to the IC.
Apache License 2.0
37 stars 10 forks source link

feat(refactor): Clean up fee calculation and apply a minimum fee for errors. #145

Closed dfinity-ryancroote closed 1 year ago

dfinity-ryancroote commented 1 year ago

This PR cleans up the fee calculation in case there is an error when pulling a rate from the ForexRateStore. It cleans up the fee calculation by adding a ChargeOption enum that maps more easily to how the fee is calculated instead of having multiple arguments.