cowprotocol / cow-sdk

CoW protocol SDK
https://docs.cow.fi/cow-protocol/reference/sdks/cow-sdk
Other
31 stars 9 forks source link

feat: allow changing backoff and limiter per request #208

Closed shoom3301 closed 4 months ago

shoom3301 commented 4 months ago

Context: https://cowservices.slack.com/archives/C0361CDG8GP/p1715853690864799?thread_ts=1715851334.267859&cid=C0361CDG8GP

In some cases we need to configure backoff or limiter per request. For example, by default we want to use default strategy (10 retries), but for a specific case we want to use 1 retry.

To allow that I've included RequestOptions into ApiContext and added override of the parameters.

coveralls commented 4 months ago

Coverage Status

coverage: 78.809% (-0.04%) from 78.851% when pulling 826f4101b648c07b9d03f06d60772ed1bfa8ba1b on feat/flexible-request-options into 3654b87308e8b7fa51638e4609c0d744fbee65aa on main.