Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add useStarkProfile hook #354

Merged
merged 10 commits into from
Nov 28, 2023
Merged

Conversation

irisdv
Copy link
Contributor

@irisdv irisdv commented Nov 22, 2023

This PR introduce a new hook useStarkProfile which retrieves a user starkname and all data he may have written on his starknet id : his profile picture metadata, his social media verification (twitter id, github id, discord id), and if the user has done his proof of personhood verification.

@irisdv irisdv requested a review from fracek as a code owner November 22, 2023 13:58
Copy link

netlify bot commented Nov 22, 2023

Deploy Preview for starknet-react ready!

Name Link
🔨 Latest commit a5e6e03
🔍 Latest deploy log https://app.netlify.com/sites/starknet-react/deploys/6565c446187b4700089acb34
😎 Deploy Preview https://deploy-preview-354--starknet-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

import { useStarkProfile } from "@starknet-react/core";

function MyComponent() {
const [address, setAddress] = useState<string>("");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a default profile that's properly setup on testnet? So it will show data out of the box.

@@ -140,3 +158,51 @@ function LookupName() {
</div>
);
}

function LookupProfile() {
const [address, setAddress] = useState<string>("");
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as below

Comment on lines 171 to 172
console.log("data", data);
console.log("error", error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log("data", data);
console.log("error", error);

"0x0293eb2ba9862f762bd3036586d5755a782bd22e6f5028320f1d0405fd47bff4",
verifier_pfp:
"0x070aaa20ec4a46da57c932d9fd89ca5e6bb9ca3188d3df361a32306aff7d59c7",
multicall: "", // todo: deploy on mainnet and add address
Copy link
Contributor

Choose a reason for hiding this comment

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

I think before I can merge we need this or the hook won't work.

@fracek fracek merged commit 89e0e8b into apibara:main Nov 28, 2023
5 checks passed
@github-actions github-actions bot mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants