Not sure if you're accepting pull requests on this repo but I've made an enhancement to this script that I thought I'd share.
Here instead of waiting an arbitrary 30 seconds for all of the claims to complete before moving on to the payment function I added functionality to check whether all claims completed successfully before moving on to the payment function. The check occurs asynchronously for all claims that were made so it will be fast. If any claims do not validate within 60 seconds they will fail and prompt the user to retry the claim.
Unfortunately, as I don't have much time to check the changes made, I don't accept any pull request for security reason!
Thanks for your understanding!
Not sure if you're accepting pull requests on this repo but I've made an enhancement to this script that I thought I'd share.
Here instead of waiting an arbitrary 30 seconds for all of the claims to complete before moving on to the payment function I added functionality to check whether all claims completed successfully before moving on to the payment function. The check occurs asynchronously for all claims that were made so it will be fast. If any claims do not validate within 60 seconds they will fail and prompt the user to retry the claim.