Skip to content

Commit

Permalink
fix: broken isAddressEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jul 5, 2023
1 parent 8248da2 commit 29b3139
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/hooks/useIsSelf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react"
import { CharacterEntity } from "crossbell"
import { useAccountState } from "@crossbell/connect-kit"
import { isAddressEqual, Address } from "viem"

export function useIsSelf(character: CharacterEntity | null | undefined) {
const account = useAccountState((s) => s.computed.account)
Expand All @@ -11,10 +10,7 @@ export function useIsSelf(character: CharacterEntity | null | undefined) {
case "email":
return character?.characterId === account.characterId
case "wallet":
return isAddressEqual(
account.handle as Address,
(character?.handle ?? "") as Address,
)
return account.handle === character?.handle
default:
return false
}
Expand Down

1 comment on commit 29b3139

@vercel
Copy link

@vercel vercel bot commented on 29b3139 Jul 5, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

xcard – ./

xcard-git-main-rss3.vercel.app
xcard-five.vercel.app
www.xchar.app
xcard-rss3.vercel.app
xchar.app

Please sign in to comment.