-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor: local storage keys to appkit + network switch fixes #2861
Merged
Merged
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
eea9b15
refactor: update local storage keys
enesozturk 920ba16
chore: format files
enesozturk 66a7bc6
chore: revert storage util
enesozturk 3730a42
chore: linter and test issues
enesozturk 67065e8
chore: add changeset file
enesozturk a288e87
Trigger workflow
enesozturk bb68d9c
refactor: update local storage get and sets
enesozturk 499dcd2
fix: build and test issues
enesozturk 69ca8d2
chore: type issues
enesozturk 7ceb8eb
Merge branch 'main' of github.com:WalletConnect/web3modal into refact…
tomiir 61981a1
chore: always stringify value. Fix test
tomiir 874a621
chore: remove unused var
tomiir ccc5ebd
chore: close toast when rejecting message
tomiir bf7aefb
chore: use SafeLocalStorage on StorageUtil. Adjust tests
tomiir 80659df
Merge branch 'main' into refactor/local-storage-keys-to-appkit-2
tomiir 97b643e
chore: removeo nly
tomiir 00b6aa7
Merge branch 'main' into refactor/local-storage-keys-to-appkit-2
tomiir d51e6da
Merge branch 'main' of github.com:WalletConnect/web3modal into refact…
tomiir 169e9a9
fix: do not instantiate public key if namespace is not solana
tomiir a26c6d7
Merge branch 'refactor/local-storage-keys-to-appkit-2' of github.com:…
tomiir 162d3db
fix: switch network flow
tomiir 1eb7feb
chore: remove log
tomiir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
'@reown/appkit-adapter-ethers5': patch | ||
'@reown/appkit-adapter-ethers': patch | ||
'@reown/appkit-utils': patch | ||
'@reown/appkit': patch | ||
'@reown/appkit-common': patch | ||
'@reown/appkit-wallet': patch | ||
'@reown/appkit-core': patch | ||
'@apps/demo': patch | ||
'@apps/gallery': patch | ||
'@apps/laboratory': patch | ||
'@examples/html-ethers': patch | ||
'@examples/html-ethers5': patch | ||
'@examples/html-wagmi': patch | ||
'@examples/next-ethers': patch | ||
'@examples/next-wagmi': patch | ||
'@examples/react-ethers': patch | ||
'@examples/react-ethers5': patch | ||
'@examples/react-solana': patch | ||
'@examples/react-wagmi': patch | ||
'@examples/vue-ethers5': patch | ||
'@examples/vue-solana': patch | ||
'@examples/vue-wagmi': patch | ||
'@reown/appkit-adapter-polkadot': patch | ||
'@reown/appkit-adapter-solana': patch | ||
'@reown/appkit-adapter-wagmi': patch | ||
'@reown/appkit-cdn': patch | ||
'@reown/appkit-ethers': patch | ||
'@reown/appkit-ethers5': patch | ||
'@reown/appkit-polyfills': patch | ||
'@reown/appkit-scaffold-ui': patch | ||
'@reown/appkit-siwe': patch | ||
'@reown/appkit-solana': patch | ||
'@reown/appkit-ui': patch | ||
'@reown/appkit-wagmi': patch | ||
--- | ||
|
||
Updates the localstorage keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export const EthersConstantsUtil = { | ||
WALLET_ID: '@w3m/wallet_id', | ||
ERROR_CODE_UNRECOGNIZED_CHAIN_ID: 4902, | ||
ERROR_CODE_DEFAULT: 5000 | ||
} as const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
export const WcConstantsUtil = { | ||
WALLET_ID: '@w3m/wallet_id' as const, | ||
WALLET_NAME: '@w3m/wallet_name' as const, | ||
ACTIVE_CAIPNETWORK: '@w3m/active_caipnetwork' as const, | ||
ERROR_CODE_UNRECOGNIZED_CHAIN_ID: 4902, | ||
ERROR_CODE_DEFAULT: 5000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't do the parsing here. An example;
We have
@appkit/active_caip_network
key, which is expected to storeCaipNetwork
type.If we set
'@appkit/active_caip_network': string
onSafeLocalStorageItems
, thegetItem
'scatch
will return type error bc, if somehow the parsing fails, it'll returnstring
which is not what that key stores.So the
stringify
ing andparse
ing should be abstracted from thisSafeLocalStorage
utility.