aufacicenta / splitfund-contracts

Sp/itfund is a co-ownership protocol built on NEAR.
https://splitfund.xyz
2 stars 1 forks source link

Conditional Escrow Contract #9

Closed netpoe closed 2 years ago

netpoe commented 2 years ago

Tailor the withdraw function of Escrow to allow the account to withdraw the funds only if these conditions are met:

The expiration_date is lower than now AND The min_deposit is not met

If the above conditions are instead:

The expiration_date is lower than now AND the min_deposit is met

Then allow the withdraw function to send the funds to the recipient_account_id: AccountId

expiration_date, min_deposit and recipient_account_id are values that need to be set upon the contract creation.

Note: Write the tests inside the ConditionalEscrow contract.