-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add SwitchNetworkModal & integrate the whole connection process…
… to EmbeddedModal (#239) * feat: Support solana on mobile * chore: update versions (alpha) (#225) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Add deeplink for tw solana on mobile * chore: update versions (alpha) (#226) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Add phantom deeplink * fix: Add deelink for phantom * chore: update versions (alpha) (#227) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Update tron dependencies * chore: update versions (alpha) (#230) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Fix an issue where solana is disconnected when trust evm wallet is disconnected * chore: update versions (alpha) (#231) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: Update demo * fix: Fix the trust wallet will automatically connect when the page loaded * chore: update versions (alpha) (#232) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Fix the trust wallet will automatically connect when the page loaded * docs: Add change log * chore: update versions (alpha) (#233) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Use window.trustwallet as TW provider to avoid conflicts * chore: update versions (alpha) (#234) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Fix trust issue * chore: update versions (alpha) (#235) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: Fix binance web3 wallet successfully detected trustwallet on mobile * feat: Add SwitchNetworkModal & integrate the whole connection process to EmbeddedModal --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
5f23f0f
commit 1baff44
Showing
58 changed files
with
3,605 additions
and
3,230 deletions.
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Support solana on mobile |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Fix binance web3 wallet successfully detected trustwallet on mobile |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Fix trust issue |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Update tron dependencies |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Fix an issue where solana is disconnected when trust evm wallet is disconnected |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Add deeplink for tw solana on mobile |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Fix the trust wallet will automatically connect when the page loaded |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Fix the trust wallet will automatically connect when the page loaded |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Use window.trustwallet as TW provider to avoid conflicts |
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,21 @@ | ||
{ | ||
"mode": "pre", | ||
"tag": "alpha", | ||
"initialVersions": { | ||
"example-nextjs": "0.0.1", | ||
"example-vite": "0.0.1", | ||
"@node-real/walletkit": "2.4.0", | ||
"website": "0.0.1" | ||
}, | ||
"changesets": [ | ||
"big-donuts-push", | ||
"few-guests-melt", | ||
"happy-countries-exercise", | ||
"happy-jobs-hope", | ||
"itchy-hats-applaud", | ||
"little-panthers-tickle", | ||
"nervous-horses-study", | ||
"pink-carrots-jam", | ||
"slimy-books-turn" | ||
] | ||
} |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': patch | ||
--- | ||
|
||
Add deelink for phantom |
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,5 @@ | ||
--- | ||
'@node-real/walletkit': minor | ||
--- | ||
|
||
Add SwitchNetworkModal & integrate the whole connection process to EmbeddedModal |
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
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
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
35 changes: 35 additions & 0 deletions
35
packages/walletkit/src/core/components/DisconnectButton/index.tsx
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,35 @@ | ||
import { Button, ButtonProps } from '@/core/base/components/Button'; | ||
import { useConnect, useDisconnect } from 'wagmi'; | ||
import { clsContainer } from './styles.css'; | ||
import { cx } from '@/core/base/utils/css'; | ||
import { ExitIcon } from '@/core/base/icons/ExitIcon'; | ||
import { useCloseAllModals } from '@/core/hooks/useCloseAllModals'; | ||
|
||
export type DisconnectButtonProps = ButtonProps; | ||
|
||
export function DisconnectButton(props: DisconnectButtonProps) { | ||
const { className, ...restProps } = props; | ||
|
||
const { reset } = useConnect(); | ||
const { disconnect } = useDisconnect(); | ||
const { onCloseAllModals } = useCloseAllModals(); | ||
|
||
const onDisconnect = () => { | ||
onCloseAllModals(); | ||
setTimeout(() => { | ||
disconnect(); | ||
reset(); | ||
}, 100); | ||
}; | ||
|
||
return ( | ||
<Button | ||
className={cx('wk-disconnect-button', clsContainer, className)} | ||
onClick={onDisconnect} | ||
{...restProps} | ||
> | ||
<ExitIcon /> | ||
Disconnect | ||
</Button> | ||
); | ||
} |
Oops, something went wrong.