bosonprotocol / contracts

[DEPRECATED] Boson Protocol v1
GNU Lesser General Public License v3.0
69 stars 17 forks source link

VoucherKernel.getTotalDeposits fix #342

Closed zajck closed 2 years ago

zajck commented 2 years ago

VoucherKernel.getTotalDeposits expected that tokenIdSupply is passed in, but there was a mistake and the voucherId was passed in.

I renamed the function to getTotalDepositsForVoucher to be clear it depends on voucher, not on voucher set and modified it to return correct values.

A consequence of bug was, that LogFundsReleased was not emitted when it should be. I noticed that this was not properly tested so I also added missing checks to 3_withdrawals and 3_1_withdrawals_per_entity