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

Added verification and scoring functionality. Created usePassport hook. #1

Open
wants to merge 4 commits into
base: scaffold-eth-gitcoin-passport
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/react-app/src/hooks/usePassport.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PassportReader } from "@gitcoinco/passport-sdk-reader";

/*
*
* This module provices access to a
* This module provides access to a
* PassportProvider which should be instantiated
* at the top of the app, as well as a
* usePassport hook which provides access
Expand Down Expand Up @@ -55,7 +55,7 @@ function resetPassport() {
}

function setPassport(data) {
return { ...defaults, ...data, misssing: null, error: null };
return { ...defaults, ...data, missing: null, error: null };
}

function errorPassport(message, extraData) {
Expand Down Expand Up @@ -142,7 +142,7 @@ function usePassportManager() {
async address => {
const verifier = await loadVerifier();

// Verify passport for the given addresss
// Verify passport for the given address
// Returns (e.g.):
// {
// issuanceDate: '2022-08-03T22:30:15.042Z'
Expand Down Expand Up @@ -337,13 +337,13 @@ function PassportProvider({ children }) {
// // Read unverified Passport data for the given ethereum address
// activate({
// mode: "read",
// address: "0x123sadf123",
// address: "0x123asdf123",
// });
//
// // Read verified Passport data for the given ethereum address
// activate({
// mode: "verify",
// address: "0x123sadf123",
// address: "0x123asdf123",
// });
//
// // Score example is shown above.
Expand Down