Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Sign 2.5 #2033

Merged
merged 68 commits into from
May 7, 2024
Merged

feat: Sign 2.5 #2033

merged 68 commits into from
May 7, 2024

Conversation

ganchoradkov
Copy link
Member

@ganchoradkov ganchoradkov commented Mar 6, 2024

PR adding Sign 2.5 in web3modal/ethers5 & web3modal/siwe

  • on siwe request, sign 2.5 authentication is used by default - if it's not supported by the wallet it fallbacks to legacy
  • all web3modal/siwe behaviour preserved for backwards compatibility
  • new getMessageParams client method is added to createSIWEConfig so the params that compose siwe message can be passed to Sign for multi-chain authentication
  • replaced siwe package with @walletconnect/utils as recaps in siwe statement was not supported

to test

wallet (on sign 2.5) - https://react-wallet-v2-kmnfc86q1-walletconnect1.vercel.app/walletconnect
legacy - any other supporting v2 protocol

Copy link

vercel bot commented Mar 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3modal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 3:52pm
web3modal-gallery ✅ Ready (Inspect) Visit Preview May 7, 2024 3:52pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview May 7, 2024 3:52pm
web3modal-react-wagmi-ex ❌ Failed (Inspect) May 7, 2024 3:52pm
web3modal-vue-wagmi-ex ❌ Failed (Inspect) May 7, 2024 3:52pm

# Conflicts:
#	package-lock.json
#	packages/core/src/controllers/OptionsController.ts
#	packages/ethers5/package.json
packages/core/src/controllers/OptionsController.ts Outdated Show resolved Hide resolved
packages/ethers5/src/client.ts Outdated Show resolved Hide resolved
packages/ethers5/src/client.ts Outdated Show resolved Hide resolved
apps/laboratory/src/utils/SiweUtils.ts Outdated Show resolved Hide resolved
apps/laboratory/src/utils/SiweUtils.ts Outdated Show resolved Hide resolved
apps/laboratory/src/utils/SiweUtils.ts Outdated Show resolved Hide resolved
@ganchoradkov ganchoradkov merged commit a9c53c6 into V4 May 7, 2024
11 checks passed
@ganchoradkov ganchoradkov deleted the feat/sign-2.5 branch May 7, 2024 16:30
@svenvoskamp svenvoskamp restored the feat/sign-2.5 branch May 8, 2024 12:34
@svenvoskamp svenvoskamp deleted the feat/sign-2.5 branch May 8, 2024 12:35
luu-alex added a commit to ChainSafe/web3modal that referenced this pull request May 13, 2024
* chore(lab): dogfooding button (reown-com#2206)

* chore: fix typos (reown-com#2188)

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* refactor: render tooltip in root (reown-com#2210)

* feat: add react-ethers 6 example (reown-com#1920)

Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>

* refactor: swap business logic improvements (reown-com#2199)

* chore: detailed canary timings (reown-com#2214)

* chore: add apple app site association (reown-com#2216)

* :feat add send logic  (reown-com#2173)

Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* fix: apple-app-site-association content type header (reown-com#2217)

* feat: Sign 2.5 (reown-com#2033)

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* feat: Smart Account 6492 Signature Tests (reown-com#2196)

* fix: sign modal not appearing when going through siwe flow (reown-com#2213)

* Add signAndSendTransaction to Solflare, Backpack and Trust Wallet Ada… (reown-com#2190)

Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>

* fix: missing call to SIWE `onSignOut` (reown-com#2054)

Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* fix: dayjs locale format seconds is not working and is polluting the global dayjs locale (reown-com#1689)

Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
Co-authored-by: enesozturk <enesozturk.d@gmail.com>

* :deprecate - injected connector (reown-com#2223)

* chore: more canary timings (reown-com#2215)

* chore: updates ethereum-provider to latest (reown-com#2226)

* fix: add assertion for the erc20 abi json import (reown-com#2225)

* update packages

---------

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Luka Isailovic <lukaisailovic@gmail.com>
Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: GooxPF <gooxpf@gmail.com>
Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>
Co-authored-by: Tiến Nguyễn Khắc <tien.nguyenkhac@icloud.com>
Co-authored-by: Nikos Rossolatos <nikos@cointracker.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
luu-alex added a commit to ChainSafe/web3modal that referenced this pull request May 16, 2024
* chore(lab): dogfooding button (reown-com#2206)

* chore: fix typos (reown-com#2188)

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* refactor: render tooltip in root (reown-com#2210)

* feat: add react-ethers 6 example (reown-com#1920)

Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>

* refactor: swap business logic improvements (reown-com#2199)

* chore: detailed canary timings (reown-com#2214)

* chore: add apple app site association (reown-com#2216)

* :feat add send logic  (reown-com#2173)

Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* fix: apple-app-site-association content type header (reown-com#2217)

* feat: Sign 2.5 (reown-com#2033)

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>

* feat: Smart Account 6492 Signature Tests (reown-com#2196)

* fix: sign modal not appearing when going through siwe flow (reown-com#2213)

* Add signAndSendTransaction to Solflare, Backpack and Trust Wallet Ada… (reown-com#2190)

Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>

* fix: missing call to SIWE `onSignOut` (reown-com#2054)

Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>

* fix: dayjs locale format seconds is not working and is polluting the global dayjs locale (reown-com#1689)

Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
Co-authored-by: enesozturk <enesozturk.d@gmail.com>

* :deprecate - injected connector (reown-com#2223)

* chore: more canary timings (reown-com#2215)

* chore: updates ethereum-provider to latest (reown-com#2226)

* fix: add assertion for the erc20 abi json import (reown-com#2225)

* fix: encodes all `personal_sign` messages to hex (reown-com#2237)

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>

* fix: siwe tests for 1 click auth (reown-com#2267)

* feat: phantom deeplink for mobile app browsers (reown-com#2250)

Co-authored-by: tomiir <rocchitomas@gmail.com>

* fix: 4.2.0 bug fixes (reown-com#2234)

Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>

* chore: UI canary 10 minute timeout (reown-com#2269)

* chore: bump to main 4.2.0 version (reown-com#2270)

* :feat social login - 1 - UI  (reown-com#2266)

Co-authored-by: enesozturk <enesozturk.d@gmail.com>

* :feat social login - 2 - Wallet (reown-com#2272)

* :feat social login - 3 - AuthConnector  (reown-com#2274)

* refactor: update profile name rendering logic (reown-com#2276)

* :hotfix in app support for injected and announced wallets  (reown-com#2279)

* refactor/theme variables and v4 ui updates (reown-com#2277)

---------

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Snoppy <michaleli@foxmail.com>
Co-authored-by: tomiir <rocchitomas@gmail.com>
Co-authored-by: Enes <enesozturk.d@gmail.com>
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com>
Co-authored-by: Luka Isailovic <lukaisailovic@gmail.com>
Co-authored-by: Cali93 <32299095+Cali93@users.noreply.github.com>
Co-authored-by: Gancho Radkov <43912948+ganchoradkov@users.noreply.github.com>
Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
Co-authored-by: Glitch <glitch.txs@gmail.com>
Co-authored-by: Glitch <66949816+glitch-txs@users.noreply.github.com>
Co-authored-by: Sven <fr.sven.fr@gmail.com>
Co-authored-by: GooxPF <gooxpf@gmail.com>
Co-authored-by: Valentyn <valentin.vad.sh@gmail.com>
Co-authored-by: Tiến Nguyễn Khắc <tien.nguyenkhac@icloud.com>
Co-authored-by: Nikos Rossolatos <nikos@cointracker.com>
Co-authored-by: Ilja <3154053+xzilja@users.noreply.github.com>
@UTkzhang
Copy link

UTkzhang commented May 20, 2024

@ganchoradkov @glitch-txs @tomiir @enesozturk

This PR poses a few issues.

First, it is not backwards compatible with previous SIWE implementations. The new function requirement of getMessageParams should be optional instead.

Second, it makes current latest deployed docs outdated, one example being, that the new EIP155 standard eip155:chainId:address format is not compatible with latest siwe standard (and hence the siwe recommended npm lib for react, for e.g.). See https://eips.ethereum.org/EIPS/eip-4361 under "address". This should not be the default behaviour, and would cause another breaking change for many users (and one that isn't actually easily fixable, unless you force migration to chain specific format address).

IMO, these behaviours should be corrected in a future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants