origin-dollar
origin-dollar copied to clipboard
Fix rounding issue in OUSD redeemAll unit test
To get the unit test passing, the last assertion in the redeemAll unit tests has been commented out. This issue is to get to the bottom of the following error.
1) Vault Redeem
Should have redeemAll result in zero balance:
AssertionError: Expected "1" to be equal 0
+ expected - actual
{
- "_hex": "0x00"
+ "_hex": "0x01"
"_isBigNumber": true
}
at Proxy.<anonymous> (test/helpers.js:56:28)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at listOnTimeout (node:internal/timers:538:9)
at processTimers (node:internal/timers:512:7)
at Context.<anonymous> (test/vault/redeem.js:431:5)
This is happing as a result of the resolution change from using 1e18 to 1e27 in test cases.
This probably means that it's happening live as well.