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

Add support for the new cross window functionality in web wallet #1067

Merged
merged 197 commits into from
Mar 11, 2024

Conversation

CiprianDraghici
Copy link
Contributor

@CiprianDraghici CiprianDraghici commented Mar 8, 2024

Feature

  • Add support for cross-window wallet
  • Implement a new experimental webview provider
  • Update WalletConnect package and functionality
  • Fixed sign step signing and labels
  • Fixed signing multiple transactions with guarded ledger
  • Added getHasNativeAuth in order to see if nativeAuth has been configured on development mode
  • Added support for nativeAuth impersonat
  • Updated WalletConnectV2 account provider to be updated on new or existing session

Additional changes

Contains breaking changes

[x] No

[] Yes

Updated CHANGELOG

[x] Yes

Testing

[x] User testing
[] Unit tests

Miro Mărgineanu and others added 21 commits March 6, 2024 17:57
* Fix Sign step progress

* Upgrade @multiversx/sdk-web-wallet-cross-window-provider

* Added the identifier instead of the ticker.

* Update CHANGELOG

* 2.28.7-alpha.24

---------

Co-authored-by: Miro Mărgineanu <miro.margineanu@elrond.com>
Fixed base64 utils encoding check and conversion
* update @multiversx/sdk-wallet-connect-provider to 4.1.1 ( @WalletConnect 2.11.2 )

* - Removed canLoginRef requirement
- Do not login if component is not mounted
- Avoid double QR generation

* updated type for loginButtonText

* 2.28.8-alpha.2

* Updated CHANGELOG
package.json Outdated Show resolved Hide resolved
src/UI/pages/UnlockPage/index.tsx Outdated Show resolved Hide resolved
arhtudormorar and others added 4 commits March 8, 2024 19:20
* Add linting rule

* Update CHANGELOG

* Revert version

* Rename multisig to modifiedAccount

* Temp remove cross window wallet button

* Add data-testid from enum
@CiprianDraghici CiprianDraghici merged commit 5997bd2 into development Mar 11, 2024
2 checks passed
@CiprianDraghici CiprianDraghici deleted the cross-window-hub branch March 11, 2024 11:40
razvantomegea added a commit that referenced this pull request Mar 14, 2024
* Add support for the new cross window functionality in web wallet (#1067)

* add walletV2 provider WIP

* get wallet address from state

* Message communication working

* login with wallet v2

* login with wallet v2

* Navigation working

* fix event listener removal

* prepare sign

* Fix yarn lock

* Minor refactor

* FIx error

* close child window on unload

* remove console log

* remove console log

* sign when child window is closed

* sign when child window is closed

* cancel tx

* Add logout

* Update yarn lock

* Work on login event

* Work on walletProvider

* Remove isChildTab key

* Rename walletV2 to crossWindow

* Updated parentDapp to window.document.referrer

* Remove reference to referrer

* Update version to alpha

* provider wip

* sign transactions

* Add comments

* Update alpha version

* fix wallet refresh (handshake lost)

* cancel action from dApp

* Update version

* use provider from package

* fix import

* alpha version

* alpha version increment

* increment cross window provider version

* increment alpha version

* regenerate yarn lock

* Add comment

* bump version

* regenerate yarn lock

* bump provider version

* bump alpha version

* New webview provider (#996)

* wip wallet hub integration

* implement new webview provider

* implement new webview provider functionality

* fix signMessage implementaion on the NewWebviewProvider + some cleanup

* fix sign message flow

* cleanup

* cleanup and revert unnecessary changes

* revert minify changes

* 2.24.2-alpha.7

* use new cross window provider response types

* changes on cross window provider types reexports

* update cross provider version

* cross window provider reexports

* set minify

* reset local publish config

* strongly types on the new webview provider

* revert minification settings

* remove comment

* revert minification settings

* refactoring according to code review

* update logout function

* upgrade cross window provider version

* cleanup

* yarn.lock

* increment version

* regenerate yarn lock

* apply minification

* Update version

* rename NewWebViewProvider into ExperimentalWebviewProvider

* 2.26.0-alpha.3

* 2.26.0-alpha-4

* Fixed build error

* Upgrade @multiversx/sdk-web-wallet-cross-window-provider@0.0.10

* Upgrade version

* Upgrade provider

* cleanup

* 2.26.0-alpha-8

* fix sign message

* 2.26.0-alpha-9

* try to fix the issue of accessing origin from Window outside of the iframe

* 2.26.0-alpha.10

* fix build

* 2.27.0-alpha.0

* cleanup after merge

* 2.27.0-alpha.1

* Fix axios instance

* Update version

* Add axios patch

* Set interceptors

* Fix interceptors

* Fix tests

* Update README

* Upgrade corss-window-provider

* 2.28.0-alpha.3

* Changed postMessage payload from string to plain object (#1025)

* Changed postMessage payload from string to plain object

* Updated helpers and CHANGELOG.md

* 2.28.0-alpha.4

* Updated CHANGELOG.md

* Removed exports

* Updated package.json

* 2.28.0-alpha.5

* Improve tsc support (#1026)

* Update sdk-web-wallet-cross-window-provider@0.0.19

* 2.28.0-alpha.7

* Updated sdk-core

* 2.28.1-alpha.0

* Update yarn lock

* 2.28.4-alpha.1

* Fix extension cancel mesage

* 2.28.4-alpha.2

* Updated sdk-core

* 2.28.5-alpha.0

* Updated sdk-core

* 2.28.5-alpha.1

* Update yarn lock

* 2.28.5-alpha.2

* Upgrade @multiversx/sdk-web-wallet-cross-window-provider@0.0.20

* 2.28.5-alpha.3

* Extract multisig login logic

* Fix login

* 2.28.5-alpha.4

* Fixed wallet connect breaks login with other providers (#1041)

* Fix wallet connect login

* Fix possibly undefined payload (#1040)

* Fixe possibly undefined payload

* Update CHANGELOG

* Wallet connect provider state clear

* Fix wallet connect init and extension login cancel

* Updated CHANGELOG.md

---------

Co-authored-by: Tudor Morar <tudor.morar@multiversx.com>

* 2.28.6-alpha.0 (#1045)

* 2.28.6-alpha.1

* Fix types

* 2.28.6-alpha.2

* 2.28.6-alpha.5

* 2.28.7-alpha.0

* 2.28.7-alpha.1

* Fix tests and build

* Add support for nativeAuth impersonate (#1049)

* Add support for nativeAuth impersonate

* Fixed issues with wallet connect (#1050)

* Fix issues with wallet connect

* Remove ref

* Revert changes

* Update hook

* Move slice to login instead of account

* Update changelog and version

* Update version

* 2.28.7-alpha.4

* Add getHasNativeAuth (#1051)

* Add checkNativeAuth

* Update changelog and increment version

* Rename function

* Avoid sending nativeAuth if it is not configured

* Update QR initialization to not do extra steps if it is not mounted

* Update walletConnect initialization (#1052)

* Update walletConnect initialization

* Fix wallet connect chainID (#1053)

* Add waitForChainID for useWalletConnectV2Login

* Added new fee and receiver fields.

* Updated data field styles.

* Updated wording.

* increment alpha

* increment alpha

* Added markup.

* Fixed wrongfully placed data test identifier.

* 2.28.7-alpha.19

* Added missing data test identifier.

* 2.28.7-alpha.20

* Updated layout.

* Updated file structure.

* 2.28.7-alpha.21

* Updated code quality.

* Removed redundant condition.

* Updated imports to be relative.

* Fix ledger guardian signing (#1059)

* Fix ledger guardian signing

* Update CHANGELOG

* 2.28.7-alpha.22

* Added missing "data-testid".

* 2.28.7-alpha.23

* Fix Sign step progress (#1060)

* Fix Sign step progress

* Upgrade @multiversx/sdk-web-wallet-cross-window-provider

* Added the identifier instead of the ticker.

* Update CHANGELOG

* 2.28.7-alpha.24

---------

Co-authored-by: Miro Mărgineanu <miro.margineanu@elrond.com>

* 2.28.8-alpha.0

* Update WalletConnect (#1064)

* update @multiversx/sdk-wallet-connect-provider to 4.1.1 ( @WalletConnect 2.11.2 )

* - Removed canLoginRef requirement
- Do not login if component is not mounted
- Avoid double QR generation

* updated type for loginButtonText

* 2.28.8-alpha.2

* Updated CHANGELOG

* Fixed tests.

* Added "data-value".

* 2.28.8-alpha.3

* Added variable.

* Fixed code.

* 2.28.8-alpha.4

* extend ExperimentalWebviewProvider with reset state option

* 2.28.8-alpha.5

* update changelog

* update changelog

* Tm/cwh-fixes (#1068)

* Add linting rule

* Update CHANGELOG

* Revert version

* Rename multisig to modifiedAccount

* Temp remove cross window wallet button

* Add data-testid from enum

* 2.28.8-alpha.6

* fix reset state action

* 2.28.8-alpha.7

---------

Co-authored-by: Andrei <giura.andrei70@gmail.com>
Co-authored-by: Tudor Morar <tudor.morar@multiversx.com>
Co-authored-by: Razvan Tomegea <razvan.tomegea@gmail.com>
Co-authored-by: Razvan Tomegea <razvantomegea@users.noreply.github.com>
Co-authored-by: DanutIlie <42973343+DanutIlie@users.noreply.github.com>
Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com>
Co-authored-by: Miro Mărgineanu <miro.margineanu@elrond.com>
Co-authored-by: Radu Mojic <radu.mojic@multiversx.com>

* 2.29.0-beta.0

* update changelog

* Add getOperationsDetails (#1054)

* Add getOperationsDetails

* Update changelog

* Remove typing

* Update version

* Update function

* Add tests

* Fix experimental webview provider initialization (#1070)

* fix experimental webview provider initialization

* update changelog

* fix init

* small fix

* 2.29.0-beta.1

* update changelog

* Upgrade sdk packages (#1072)

* upgrade sdk-core and sdk-web-wallet-cross-window-provider packages

* update changelog

* Move axios in peerDependencies (#1023)

* move axios in peerDependencies

* update changelog

---------

Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com>

* 2.29.0-beta.2

* update changelog

* Fix wallet logout (#1074)

* Ftubix wallet logout

* Update changelog

* 2.29.0-beta.3

* Update CHANGELOG

* Fixed different address than account address in account info (#1076)

* Fixed different address than account address in account info

* Reset address state if account is not found

* Cross window 2FA signing (#1075)

* Cross window 2FA signing

* Update CHANGELOG

---------

Co-authored-by: Razvan Tomegea <razvantomegea@users.noreply.github.com>

* Updated CHANGELOG.md

* 2.29.0-beta.4

* Updated CHANGELOG.md

---------

Co-authored-by: Andrei <giura.andrei70@gmail.com>
Co-authored-by: Tudor Morar <tudor.morar@multiversx.com>
Co-authored-by: Razvan Tomegea <razvan.tomegea@gmail.com>
Co-authored-by: Razvan Tomegea <razvantomegea@users.noreply.github.com>
Co-authored-by: DanutIlie <42973343+DanutIlie@users.noreply.github.com>
Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com>
Co-authored-by: Miro Mărgineanu <miro.margineanu@elrond.com>
Co-authored-by: Radu Mojic <radu.mojic@multiversx.com>
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.

7 participants