-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve seed for name and color
- Loading branch information
teodorus-nathaniel
committed
Dec 11, 2023
1 parent
f784e73
commit a6e49f5
Showing
3 changed files
with
25 additions
and
7 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,18 @@ | ||
import { getLinkedIdentityQuery } from '@/services/datahub/identity/query' | ||
import { getAccountDataQuery } from '@/services/subsocial/evmAddresses' | ||
|
||
export default function useAddressRandomSeed( | ||
address: string, | ||
{ enabled } = { enabled: true } | ||
) { | ||
const { data: linkedIdentity } = getLinkedIdentityQuery.useQuery( | ||
address || '', | ||
{ enabled } | ||
) | ||
const { data: accountData } = getAccountDataQuery.useQuery(address || '', { | ||
enabled, | ||
}) | ||
const { evmAddress } = accountData || {} | ||
|
||
return evmAddress || linkedIdentity?.externalId || address | ||
} |
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