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(browser connect)_: Implementing signTypedData_V4 #6108

Closed alexjba closed 4 days ago

alexjba commented 6 days ago

This commit bundles the personal sign and the signTypedData_V4 sign request in the same command. The only difference between these two requests is the order of address and challenge in the params array.

What has changed:

  1. PersonalSign.. has been renamed to Sign
  2. getPersonalSignParams renamed to getSignParams and implements the parsing for both personal sign and signTypedData_V4

Needed for https://github.com/status-im/status-desktop/issues/16770

status-im-auto commented 6 days ago

Jenkins Builds

:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: e953cb6c #1 2024-11-19 12:25:51 ~4 min tests-rpc :page_facing_up:log
:heavy_check_mark: e953cb6c #1 2024-11-19 12:26:25 ~5 min android :package:aar
:heavy_check_mark: e953cb6c #1 2024-11-19 12:26:25 ~5 min linux :package:zip
:heavy_check_mark: e953cb6c #1 2024-11-19 12:26:32 ~5 min ios :package:zip
:heavy_check_mark: e953cb6c #1 2024-11-19 12:26:33 ~5 min windows :package:zip
:heavy_check_mark: e953cb6c #1 2024-11-19 12:26:50 ~5 min macos :package:zip
:heavy_check_mark: e953cb6c #1 2024-11-19 12:29:28 ~8 min macos :package:zip
:heavy_check_mark: e953cb6c #1 2024-11-19 12:56:23 ~35 min tests :page_facing_up:log
:heavy_check_mark: e953cb6c #2 2024-11-22 08:26:27 ~2 min tests-rpc :page_facing_up:log
:heavy_check_mark: e953cb6c #2 2024-11-22 08:27:34 ~3 min windows :package:zip
:heavy_check_mark: e953cb6c #2 2024-11-22 08:28:42 ~4 min macos :package:zip
:heavy_check_mark: e953cb6c #2 2024-11-22 08:28:42 ~4 min linux :package:zip
:heavy_check_mark: e953cb6c #2 2024-11-22 08:28:51 ~4 min ios :package:zip
:heavy_check_mark: e953cb6c #2 2024-11-22 08:30:00 ~6 min android :package:aar
:heavy_check_mark: e953cb6c #2 2024-11-22 08:32:07 ~8 min macos :package:zip
:heavy_check_mark: e953cb6c #2 2024-11-22 08:58:44 ~34 min tests :page_facing_up:log
:heavy_check_mark: 440996f2 #3 2024-11-22 08:47:32 ~3 min windows :package:zip
:heavy_check_mark: 440996f2 #3 2024-11-22 08:48:53 ~5 min tests-rpc :page_facing_up:log
:heavy_check_mark: 440996f2 #3 2024-11-22 08:48:57 ~5 min linux :package:zip
:heavy_check_mark: 440996f2 #3 2024-11-22 08:49:02 ~5 min android :package:aar
:heavy_check_mark: 440996f2 #3 2024-11-22 08:49:07 ~5 min macos :package:zip
:heavy_check_mark: 440996f2 #3 2024-11-22 08:49:38 ~5 min ios :package:zip
:heavy_check_mark: 440996f2 #3 2024-11-22 08:51:37 ~7 min macos :package:zip
:heavy_check_mark: 440996f2 #3 2024-11-22 09:31:12 ~32 min tests :page_facing_up:log
codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 95.12195% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.91%. Comparing base (ed36d60) to head (440996f). Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
services/connector/api.go 77.77% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #6108 +/- ## ======================================== Coverage 60.91% 60.91% ======================================== Files 820 820 Lines 109533 109550 +17 ======================================== + Hits 66724 66737 +13 - Misses 34965 34969 +4 Partials 7844 7844 ``` | [Flag](https://app.codecov.io/gh/status-im/status-go/pull/6108/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/6108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | `13.52% <12.19%> (+<0.01%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/status-im/status-go/pull/6108/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | `60.14% <95.12%> (+<0.01%)` | :arrow_up: | 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/6108?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/connector/commands/client\_handler.go](https://app.codecov.io/gh/status-im/status-go/pull/6108?src=pr&el=tree&filepath=services%2Fconnector%2Fcommands%2Fclient_handler.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvY29ubmVjdG9yL2NvbW1hbmRzL2NsaWVudF9oYW5kbGVyLmdv) | `82.53% <100.00%> (ø)` | | | [services/connector/commands/rpc\_traits.go](https://app.codecov.io/gh/status-im/status-go/pull/6108?src=pr&el=tree&filepath=services%2Fconnector%2Fcommands%2Frpc_traits.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvY29ubmVjdG9yL2NvbW1hbmRzL3JwY190cmFpdHMuZ28=) | `80.00% <ø> (ø)` | | | [services/connector/commands/sign.go](https://app.codecov.io/gh/status-im/status-go/pull/6108?src=pr&el=tree&filepath=services%2Fconnector%2Fcommands%2Fsign.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvY29ubmVjdG9yL2NvbW1hbmRzL3NpZ24uZ28=) | `80.00% <100.00%> (ø)` | | | [services/connector/commands/test\_helpers.go](https://app.codecov.io/gh/status-im/status-go/pull/6108?src=pr&el=tree&filepath=services%2Fconnector%2Fcommands%2Ftest_helpers.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvY29ubmVjdG9yL2NvbW1hbmRzL3Rlc3RfaGVscGVycy5nbw==) | `100.00% <100.00%> (ø)` | | | [signal/events\_connector.go](https://app.codecov.io/gh/status-im/status-go/pull/6108?src=pr&el=tree&filepath=signal%2Fevents_connector.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2lnbmFsL2V2ZW50c19jb25uZWN0b3IuZ28=) | `100.00% <100.00%> (ø)` | | | [services/connector/api.go](https://app.codecov.io/gh/status-im/status-go/pull/6108?src=pr&el=tree&filepath=services%2Fconnector%2Fapi.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-c2VydmljZXMvY29ubmVjdG9yL2FwaS5nbw==) | `71.08% <77.77%> (+1.46%)` | :arrow_up: | ... and [25 files with indirect coverage changes](https://app.codecov.io/gh/status-im/status-go/pull/6108/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)