Skip to content

Autoconnect Feature #224

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

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Autoconnect Feature #224

merged 1 commit into from
Jan 7, 2025

Conversation

0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Jan 7, 2025

Flag under ThirdwebManager > Preferences.

If enabled, Thirdweb will automatically connect to the last connected wallet on initialization (this behavior does not apply to the WalletConnectWallet provider option).

If a wallet was connected as a non smart wallet, then later upgraded, the smart wallet is saved as the last wallet, and the next session will autoconnect to the smart wallet.

Any failure during this entire flow should not throw.

d90a291c4de48fb3c35e7bec3dfab08f


PR-Codex overview

This PR focuses on adding the functionality for auto-connecting to the last used wallet in the ThirdwebManager class, along with new properties and serialization for wallet options.

Detailed summary

  • Added autoConnectLastWallet property in ThirdwebManagerEditor.
  • Implemented auto-connection logic in ThirdwebManager.
  • Introduced GetAutoConnectOptions and SetAutoConnectOptions methods.
  • Updated WalletOptions and related classes with JSON serialization attributes.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Flag under ThirdwebManager > Preferences.

If enabled, Thirdweb will automatically connect to the last connected wallet on initialization (this behavior does not apply to the WalletConnectWallet provider option).

If a wallet was connected as a non smart wallet, then later upgraded, the smart wallet is saved as the last wallet, and the next session will autoconnect to the smart wallet.

Any failure during this entire flow should not throw.
@0xFirekeeper 0xFirekeeper merged commit 28e6508 into v5 Jan 7, 2025
4 checks passed
@0xFirekeeper 0xFirekeeper deleted the firekeeper/autoconnect branch January 7, 2025 00:03
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.

1 participant