porter-finance / v1-core

⛰️ Smart contracts powering the Porter protocol.
https://porter.finance
GNU Affero General Public License v3.0
4 stars 3 forks source link

Allow tokens in newly deployed bond contract #311

Closed Namaskar-1F64F closed 2 years ago

Namaskar-1F64F commented 2 years ago

This PR makes the revert on initial deposit less strict. This now allows for an excess of tokens to be in the address in which the new bond will be deployed. Previously, if the address had tokens the bond creation would revert.

I added a test with some amount of collateral tokens added to the contract before initialization and a bond being created.