Algorithm 4. Delete the policy.
Input: policyID |
Output: Boolean Status |
async deletePolicy(policyId) |
{ |
try { |
if (policyExists) |
{ |
fcn: ‘deletePolicy’, |
args: [ctx, policyId] |
await contract.submitTransaction(deletePolicyRequest); |
return true; |
} |
throw new Error(‘policy does not exist’); |
} |
} |
catch (err) { |
throw err; |
} |
} |