Skip to content

Commit

Permalink
fix: restore bookmark name from connected wallet (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov authored Feb 13, 2024
1 parent 6a56f69 commit 71f06f5
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ export const SendToWalletButton = () => {
? defaultChainIdsByType[chainType]
: undefined;

const headerTitle = selectedBookmark?.isConnectedAccount
? matchingConnectedAccount?.connector?.name || address
: selectedBookmark?.name || address;
const isConnectedAccount = selectedBookmark?.isConnectedAccount;
const connectedAccountName = matchingConnectedAccount?.connector?.name;
const bookmarkName = selectedBookmark?.name;

const headerSubheader = selectedBookmark?.isConnectedAccount
? !!matchingConnectedAccount && address
: !!selectedBookmark?.name && address;
const headerTitle = isConnectedAccount
? connectedAccountName || address
: bookmarkName || connectedAccountName || address;

const headerSubheader =
isConnectedAccount || bookmarkName || connectedAccountName ? address : null;

const handleOnClick = () => {
navigate(
Expand Down

0 comments on commit 71f06f5

Please sign in to comment.