-
Notifications
You must be signed in to change notification settings - Fork 171
feat(wallet): use reown for wallets management #7639
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
Open
shoom3301
wants to merge
19
commits into
main
Choose a base branch
from
fix/wallets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e363f9a
feat(wallet): use reown for wallets management
shoom3301 15d746f
chore(i18n): extract i18n strings [automatic]
github-actions[bot] 34bf385
chore: fix comment
shoom3301 bbf1865
fix: add connection type
shoom3301 d1282d5
fix: fix trade reset on token selection
shoom3301 ac31ae6
fix(widget): fix reconnecting state in dapp mode
shoom3301 56e485c
chore: fix test
shoom3301 ce6efdb
fix: add timeout to restoring wallet
shoom3301 1c6f760
chore: extend getIsSafeAppIframe
shoom3301 c4b2208
chore: fix WidgetStandaloneModeUpdater
shoom3301 786eb52
chore: mock
shoom3301 f8b0fee
fix: isolate reown localStorage
shoom3301 ca4a932
chore: fix reown features
shoom3301 d46928b
chore: fix open view
shoom3301 6f544f3
chore: fix imtoken wallet
shoom3301 ee8f3b7
fix: do not override current connector
shoom3301 045da00
chore: update deps
shoom3301 9e86984
chore: remove patch
shoom3301 5ee6763
chore: revert providerIsolation deletion
shoom3301 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
38 changes: 0 additions & 38 deletions
38
apps/cowswap-frontend/src/modules/injectedWidget/updaters/WidgetStandaloneMode.updater.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ import svgr from 'vite-plugin-svgr' | |
| import viteTsConfigPaths from 'vite-tsconfig-paths' | ||
|
|
||
| import { execSync } from 'child_process' | ||
| import { readFile } from 'node:fs/promises' | ||
| import * as path from 'path' | ||
|
|
||
| import pkg from './package.json' | ||
|
|
@@ -195,6 +196,25 @@ export default defineConfig(({ mode, isPreview }) => { | |
| }) | ||
| }, | ||
| }, | ||
| { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes |
||
| // @reown/appkit ships .js.map files whose `sources` point at the original | ||
| // TypeScript (exports/react.ts, src/**/*.ts) without inlining `sourcesContent`, | ||
| // and the published tarball doesn't include those .ts files. esbuild follows the | ||
| // sourceMappingURL pragma during prebundling and propagates the null sources into | ||
| // the optimized dep map, so devtools 404s on every reown source ("DevTools failed | ||
| // to load source map"). Drop the pragma for @reown files so esbuild treats the | ||
| // shipped compiled .js as the source and embeds real `sourcesContent` instead. | ||
| name: 'cow-reown-strip-sourcemap', | ||
| setup(build) { | ||
| build.onLoad({ filter: /[\\/]@reown[\\/].*\.js$/ }, async (args) => { | ||
| const contents = await readFile(args.path, 'utf8') | ||
| return { | ||
| contents: contents.replace(/\n?\/\/# sourceMappingURL=.*$/gm, ''), | ||
| loader: 'js', | ||
| } | ||
| }) | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| // Only include packages that are direct or resolvable from the app; transitive | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,7 @@ | ||
| import { atom } from 'jotai' | ||
|
|
||
| export interface AppWalletContext { | ||
| standaloneMode: boolean | undefined | ||
| } | ||
|
|
||
| export const appWalletContextAtom = atom<AppWalletContext | null>(null) |
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.
Nice! Maybe we can also change the copy in connect button match in
apps/cowswap-frontend/src/modules/wallet/containers/WalletStatusButton/WalletStatusButton.container.tsx#L85