status-im / status-go

The Status module that consumes go-ethereum
https://status.im
Mozilla Public License 2.0
727 stars 247 forks source link

feat(wallet)_: refresh paraswap proposal on intervals defined per chains #6001

Open saledjenic opened 4 weeks ago

saledjenic commented 4 weeks ago

With these changes we're refreshing paraswap proposal along with the fees update but at different intervals.

Using the following constants we can easily adjust the intervals per chain:

paraswapProposalCheckIntervalMainnet      = 12 * time.Second
paraswapProposalCheckIntervalOptimism     = 3 * time.Second
paraswapProposalCheckIntervalArbitrum     = 3 * time.Second
paraswapProposalCheckIntervalAnvilMainnet = 2 * time.Second

This is not an urgent thing, we agreed to have it in 2.32, but since we had a conversation about it today, I just wanted to quickly draft it.

We can improve it more later and add necessary tests.

status-im-auto commented 4 weeks ago

Jenkins Builds

Click to see older builds (8) | :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result | |-|-|-|-|-|-|-| | :heavy_multiplication_x: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-6001/1/) | 2024-10-28 17:37:40 | ~1 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-6001/1//consoleText) | | :heavy_check_mark: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/macos/job/aarch64/job/main/job/PR-6001/1/) | 2024-10-28 17:40:29 | ~4 min | `macos` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-macos-241028-173550-c1b3d0-pr6001.zip) | | :heavy_check_mark: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/linux/job/x86_64/job/main/job/PR-6001/1/) | 2024-10-28 17:41:22 | ~5 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-linux-241028-173546-c1b3d0-pr6001.zip) | | :heavy_check_mark: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-6001/1/) | 2024-10-28 17:41:32 | ~5 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-241028-173545-c1b3d0-pr6001.zip) | | :heavy_check_mark: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-6001/1/) | 2024-10-28 17:41:59 | ~6 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-241028-173544-c1b3d0-pr6001.aar) | | :heavy_check_mark: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/tests-rpc/job/PR-6001/1/) | 2024-10-28 17:42:23 | ~6 min | `tests-rpc` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests-rpc/job/PR-6001/1//consoleText) | | :heavy_multiplication_x: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/windows/job/x86_64/job/main/job/PR-6001/1/) | 2024-10-28 17:46:48 | ~10 min | `windows` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-windows-241028-173552-c1b3d0-pr6001.zip) | | :heavy_check_mark: | c1b3d0e7 | [#1](https://ci.status.im/job/status-go/job/prs/job/macos/job/x86_64/job/main/job/PR-6001/1/) | 2024-10-28 17:47:14 | ~11 min | `macos` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-macos-241028-173550-c1b3d0-pr6001.zip) |
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_multiplication_x: 7b028585 #2 2024-10-28 17:45:13 ~2 min tests-rpc :page_facing_up:log
:heavy_multiplication_x: 7b028585 #2 2024-10-28 17:46:58 ~4 min tests :page_facing_up:log
:heavy_check_mark: 7b028585 #2 2024-10-28 17:47:49 ~4 min macos :package:zip
:heavy_check_mark: 7b028585 #2 2024-10-28 17:48:29 ~5 min ios :package:zip
:heavy_check_mark: 7b028585 #2 2024-10-28 17:48:29 ~5 min linux :package:zip
:heavy_check_mark: 7b028585 #2 2024-10-28 17:49:06 ~6 min android :package:aar
:heavy_check_mark: 7b028585 #2 2024-10-28 17:56:56 ~9 min macos :package:zip
:heavy_multiplication_x: 7b028585 #2 2024-10-28 17:57:40 ~10 min windows :package:zip
:heavy_check_mark: ad56b696 #3 2024-11-04 09:31:32 ~4 min ios :package:zip
:heavy_check_mark: ad56b696 #3 2024-11-04 09:32:16 ~4 min tests-rpc :page_facing_up:log
:heavy_check_mark: ad56b696 #3 2024-11-04 09:32:22 ~5 min linux :package:zip
:heavy_check_mark: ad56b696 #3 2024-11-04 09:32:36 ~5 min windows :package:zip
:heavy_check_mark: ad56b696 #3 2024-11-04 09:33:00 ~5 min macos :package:zip
:heavy_check_mark: ad56b696 #3 2024-11-04 09:33:34 ~6 min android :package:aar
:heavy_check_mark: ad56b696 #3 2024-11-04 09:37:49 ~10 min macos :package:zip
:heavy_check_mark: ad56b696 #3 2024-11-04 10:01:09 ~33 min tests :page_facing_up:log
codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 66.66667% with 39 lines in your changes missing coverage. Please review.

Project coverage is 60.83%. Comparing base (b329b15) to head (ad56b69).

Files with missing lines Patch % Lines
services/wallet/router/router_updates.go 35.89% 25 Missing :warning:
services/wallet/router/router.go 82.05% 8 Missing and 6 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #6001 +/- ## =========================================== - Coverage 60.88% 60.83% -0.06% =========================================== Files 811 811 Lines 108894 108922 +28 =========================================== - Hits 66303 66259 -44 - Misses 34841 34891 +50 - Partials 7750 7772 +22 ``` | [Flag](https://app.codecov.io/gh/status-im/status-go/pull/6001/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | Coverage Δ | | |---|---|---| | [functional](https://app.codecov.io/gh/status-im/status-go/pull/6001/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | `13.09% <46.15%> (+<0.01%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/status-im/status-go/pull/6001/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | `60.19% <64.95%> (-0.06%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/status-im/status-go/pull/6001?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | Coverage Δ | | |---|---|---| | [services/wallet/router/router.go](https://app.codecov.io/gh/status-im/status-go/pull/6001?src=pr&el=tree&filepath=services%2Fwallet%2Frouter%2Frouter.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvd2FsbGV0L3JvdXRlci9yb3V0ZXIuZ28=) | `82.07% <82.05%> (+1.21%)` | :arrow_up: | | [services/wallet/router/router\_updates.go](https://app.codecov.io/gh/status-im/status-go/pull/6001?src=pr&el=tree&filepath=services%2Fwallet%2Frouter%2Frouter_updates.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvd2FsbGV0L3JvdXRlci9yb3V0ZXJfdXBkYXRlcy5nbw==) | `47.41% <35.89%> (-9.73%)` | :arrow_down: | ... and [22 files with indirect coverage changes](https://app.codecov.io/gh/status-im/status-go/pull/6001/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)