origin-dollar icon indicating copy to clipboard operation
origin-dollar copied to clipboard

Fix rounding issue in OUSD redeemAll unit test

Open naddison36 opened this issue 2 years ago • 1 comments

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)

naddison36 avatar May 17 '23 15:05 naddison36

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.

image

DanielVF avatar Jun 29 '23 19:06 DanielVF