Withdraw Subscription

Withdraw the principal + yield from subscribers

Subscribers/Stakers can withdraw their subscription when they want by using this function below

let res = await stakingContract.withdrawSubscription({
   subscription_id : //subscriptionId,
   product_id : //productId
 });

📘

Possible Failures

To be able to withdraw before the endDate the product has to have lockedUntilFinalization as false

Withdrawing before the startDate is never possible