Steps to reproduce:
user 1:
1) registers on POH
2) execute startAcrruing
3) Creates stream with parameters:
destination: user 2. (not registered on POH)
ubiPerSecond : 10000000000000 (0.00001 UBI)
4) After some time, user 2 executes withdrawFromStream
5) try to get balance of UBI from user 1
Expected result: Should correctly fetch UBI balance for user 1
Actual result: Fails with the following error:
Error: VM Exception while processing transaction: revert SafeMath: subtraction overflow
at UBI.sub (@openzeppelin/contracts/math/SafeMath.sol:102)
at UBI.getDelegatedAccruedValue (contracts/UBI.sol:761)
at UBI.balanceOf (contracts/UBI.sol:342)
Steps to reproduce: user 1: 1) registers on POH 2) execute startAcrruing 3) Creates stream with parameters:
4) After some time, user 2 executes withdrawFromStream 5) try to get balance of UBI from user 1 Expected result: Should correctly fetch UBI balance for user 1 Actual result: Fails with the following error: