shentu
shentu copied to clipboard
Improve shield purchases and claims
Summary
When we create or update a pool, a purchase is made.
- [ ] The purchaser is set to be shield admin rather than sponsor address. Considering the sponsor is the one who submits claims, it should be the sponsor address.
- [ ] No purchase event is emitted. Should we move the purchase event from the handler to the keeper?
- [ ] We should not allow adding service fees without any purchases, because service fees are updated when purchases expire.
When a proposal is submitted,
- [ ] we didn't consider the case when we can't find the target purchase: https://github.com/certikfoundation/shentu/blob/master/x/shield/keeper/proposal.go#L52
For Admin Use
- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
If a purchase couldn't be found with the provided poolID
and purchaser
, it would've errored out on L42, no?
If a purchase couldn't be found with the provided
poolID
andpurchaser
, it would've errored out on L42, no?
Right, but we didn't check if the target purchase ID exists or not for this purchaser.