-
Notifications
You must be signed in to change notification settings - Fork 1.6k
hotfix: fix broken state swaps #3278
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
Changes from all commits
9a128d5
71f4058
bc7b24e
2b9a3db
3bdbaec
b60643a
7db0f42
34d19b4
9ac3b69
e5d5f33
ecab080
2c7cd61
1065e16
9164df0
672b9e8
7715f95
3c67cb1
91d260e
6e66a25
4982e7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| '@reown/appkit-adapter-wagmi': patch | ||
| '@reown/appkit-core': patch | ||
| '@apps/demo': patch | ||
| '@apps/gallery': patch | ||
| '@apps/laboratory': patch | ||
| '@reown/appkit-adapter-ethers': patch | ||
| '@reown/appkit-adapter-ethers5': patch | ||
| '@reown/appkit-adapter-polkadot': patch | ||
| '@reown/appkit-adapter-solana': patch | ||
| '@reown/appkit': patch | ||
| '@reown/appkit-utils': patch | ||
| '@reown/appkit-cdn': patch | ||
| '@reown/appkit-common': patch | ||
| '@reown/appkit-experimental': patch | ||
| '@reown/appkit-polyfills': patch | ||
| '@reown/appkit-scaffold-ui': patch | ||
| '@reown/appkit-siwe': patch | ||
| '@reown/appkit-siwx': patch | ||
| '@reown/appkit-ui': patch | ||
| '@reown/appkit-wallet': patch | ||
| --- | ||
|
|
||
| Fix issue with broken states on swaps |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -202,7 +202,7 @@ export const SwapController = { | |
| invalidSourceTokenAmount, | ||
| availableToSwap: | ||
| caipAddress && !invalidToToken && !invalidSourceToken && !invalidSourceTokenAmount, | ||
| isAuthConnector: type === 'AUTH' | ||
| isAuthConnector: type === 'ID_AUTH' | ||
|
Collaborator
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. Should we maybe add
Collaborator
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. this should be type checked already else it'd say that it would always be false 🤔 |
||
| } | ||
| }, | ||
|
|
||
|
|
@@ -718,7 +718,8 @@ export const SwapController = { | |
| to: data.to as `0x${string}`, | ||
| data: data.data as `0x${string}`, | ||
| value: BigInt(data.value), | ||
| gasPrice: BigInt(data.gasPrice) | ||
| gasPrice: BigInt(data.gasPrice), | ||
| chainNamespace: 'eip155' | ||
| }) | ||
|
|
||
| await this.swapTokens() | ||
|
|
@@ -770,7 +771,8 @@ export const SwapController = { | |
| data: data.data as `0x${string}`, | ||
| gas: data.gas, | ||
| gasPrice: BigInt(data.gasPrice), | ||
| value: data.value | ||
| value: data.value, | ||
| chainNamespace: 'eip155' | ||
| }) | ||
|
|
||
| state.loadingTransaction = false | ||
|
|
||
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.
was 'AUTH' stil a valid type?
Uh oh!
There was an error while loading. Please reload this page.
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.
AUTHandID_AUTHshares the type:ConnectorTypeauthConnectorId =
ID_AUTHauthConnectorType =
AUTHThis is confusing, so we should definitely improve this