-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: Update text and layout for step 0 * fix: Update text for step 2 and 3, show copy and explorer icons for addresses * fix: Update text for status messages * fix: Update hint texts * fix: Update creation modal text, add dynamic values
- Loading branch information
1 parent
18482b8
commit 477e0b2
Showing
9 changed files
with
90 additions
and
66 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
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,25 @@ | ||
import useOnboard, { connectWallet } from '@/hooks/wallets/useOnboard' | ||
import { OVERVIEW_EVENTS, trackEvent } from '@/services/analytics' | ||
import { CodedException } from '@/services/exceptions' | ||
import type { ConnectedWallet } from '@/services/onboard' | ||
|
||
const useConnectWallet = (onConnect?: (wallet?: ConnectedWallet) => void) => { | ||
const onboard = useOnboard() | ||
|
||
const handleConnect = async () => { | ||
if (!onboard) return | ||
|
||
// We `trackEvent` instead of using `<Track>` as it impedes styling | ||
trackEvent(OVERVIEW_EVENTS.OPEN_ONBOARD) | ||
|
||
const result = await connectWallet(onboard) | ||
|
||
if (result instanceof CodedException) return | ||
|
||
onConnect?.(result) | ||
} | ||
|
||
return handleConnect | ||
} | ||
|
||
export default useConnectWallet |
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