Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9a128d5
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Sep 19, 2024
71f4058
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Sep 20, 2024
bc7b24e
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Sep 23, 2024
2b9a3db
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Sep 24, 2024
3bdbaec
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Sep 26, 2024
b60643a
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Sep 27, 2024
7db0f42
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Oct 2, 2024
34d19b4
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Oct 9, 2024
9ac3b69
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 13, 2024
e5d5f33
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 14, 2024
ecab080
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 14, 2024
2c7cd61
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 15, 2024
1065e16
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 15, 2024
9164df0
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 18, 2024
672b9e8
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 18, 2024
7715f95
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 19, 2024
3c67cb1
Merge branch 'main' of https://github.com/reown-com/appkit
svenvoskamp Nov 19, 2024
91d260e
fix broken swaps
svenvoskamp Nov 19, 2024
6e66a25
add changeset
svenvoskamp Nov 19, 2024
4982e7a
Merge branch 'main' into fix/swaps
svenvoskamp Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/flat-jokes-dream.md
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
1 change: 1 addition & 0 deletions packages/adapters/wagmi/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export class WagmiAdapter extends AdapterBlueprint {
chainId,
type: 'legacy' as const
}

await prepareTransactionRequest(this.wagmiConfig, txParams)
const tx = await wagmiSendTransaction(this.wagmiConfig, txParams)
await waitForTransactionReceipt(this.wagmiConfig, { hash: tx, timeout: 25000 })
Expand Down
8 changes: 5 additions & 3 deletions packages/core/src/controllers/SwapController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export const SwapController = {
invalidSourceTokenAmount,
availableToSwap:
caipAddress && !invalidToToken && !invalidSourceToken && !invalidSourceTokenAmount,
isAuthConnector: type === 'AUTH'
isAuthConnector: type === 'ID_AUTH'
Copy link
Collaborator

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?

Copy link
Contributor Author

@svenvoskamp svenvoskamp Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AUTH and ID_AUTH shares the type: ConnectorType

authConnectorId = ID_AUTH
authConnectorType = AUTH

This is confusing, so we should definitely improve this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe add ID_AUTH to a constants file ?

Copy link
Collaborator

Choose a reason for hiding this comment

The 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 🤔
but we should use the constant regardless IMO

}
},

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down