Gas Sponsorship Eligibility Check increases the maxCounts of the policy. #867
-
Gas Sponsorship Eligibility Check API increases the maxCounts of the policyAccording to my current wallet flow, when the user lands on transaction summary page where we show the amounts, gas fees etc. Since we use smart accounts and have paymasters policies, on this page we do call the GasSponsorshipEligibily API to check for his eligibility and show on UI accordingly, and since he is on the summary page he can truthfully go back if he changes his mind about the transaction and can do so multiple times. The issue is this API call increases the maxCountspersender cap of the policy, meaning even without actually proceeding with the transaction his eligibility gets depleted every time he visits the summary page only?? Is there a better way to check eligibility without having this side effect.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @HatimPatwa, Great callout. This is not the intended behavior for your use case. Circling back with the paymaster engineering team and will let you know if we can update this functionality or provide and alternative! |
Beta Was this translation helpful? Give feedback.
@HatimPatwa We are planning a fix for this for the v4 release of the SDK since this will include breaking changes. (See the new open issue)
In the meantime, I would recommend reducing the policy expiry time on the gas manager policy. As long as the paymaster signature is valid (which is defined by the policy expiry time), the signature will contribute to the policy limits. Once the signature expires, assuming it is not used to actually send the UO, the count per sender will go back down, not count against the limit, and the sender will be eligible again.