-
Notifications
You must be signed in to change notification settings - Fork 1
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
Angelo/engr 730 add openpassport in widget #86
Open
AngeloAyranji
wants to merge
9
commits into
develop
Choose a base branch
from
angelo/engr-730-add-openpassport-in-widget
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b6ca2f0
feat(justverified): add openpassport to widget
AngeloAyranji de0931e
fix(@justverified): add openpassport to console + add type with prood…
AngeloAyranji fa7b08b
feat(console): add openpassport to justverified toggle + emit openpas…
AngeloAyranji 3a0640f
fix(@justverified): changed proof to openPassportProof
AngeloAyranji 0ba213a
fix(@justverified): return username when verification is done
AngeloAyranji 089411a
feat(justverified): add openpassport to verifications section in profile
AngeloAyranji a4d0a7e
Merge branch 'develop' of https://github.com/JustaName-id/JustaName-s…
anthony23991 e746bd8
feat(just-verified): added openpassport Icon
anthony23991 44f82dc
feat: removed default npmRegistryServer
anthony23991 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
nodeLinker: node-modules | ||
|
||
npmRegistryServer: "https://registry.yarnpkg.com" | ||
|
||
yarnPath: .yarn/releases/yarn-4.1.1.cjs |
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
3 changes: 3 additions & 0 deletions
3
apps/console/src/analytics/events/plugins/justVerified/openpassport-disabled.ts
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,3 @@ | ||
export const OPENPASSPORT_DISABLED = 'OPENPASSPORT_DISABLED'; | ||
|
||
export interface OpenPassportDisabledPayload {} |
3 changes: 3 additions & 0 deletions
3
apps/console/src/analytics/events/plugins/justVerified/openpassport-enabled.ts
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,3 @@ | ||
export const OPENPASSPORT_ENABLED = 'OPENPASSPORT_ENABLED'; | ||
|
||
export interface OpenPassportEnabledPayload {} |
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
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ export interface SelectCredentialItemProps { | |
onClick: () => void; | ||
credentialValue: | ||
| EthereumEip712Signature2021<{ username?: string; email?: string }> | ||
| EthereumEip712Signature2021<{ openPassportProof?: string }> | ||
| undefined; | ||
disabled?: boolean; | ||
} | ||
|
@@ -36,12 +37,15 @@ export const SelectCredentialItem: FC<SelectCredentialItemProps> = ({ | |
() => selectedCredential === credential, | ||
[selectedCredential, credential] | ||
); | ||
const username = useMemo( | ||
() => | ||
credentialValue?.credentialSubject?.username || | ||
credentialValue?.credentialSubject?.email, | ||
[credentialValue] | ||
); | ||
const username = useMemo(() => { | ||
const subject = credentialValue?.credentialSubject; | ||
if (!subject) return undefined; | ||
|
||
return 'username' in subject ? subject.username : | ||
'email' in subject ? subject.email : | ||
'openPassportProof' in subject ? "Valid Passport" : | ||
undefined; | ||
}, [credentialValue]); | ||
const expirationDate = useMemo( | ||
() => credentialValue?.expirationDate, | ||
[credentialValue] | ||
|
@@ -58,6 +62,9 @@ export const SelectCredentialItem: FC<SelectCredentialItemProps> = ({ | |
return <DiscordIcon width={30} />; | ||
case 'email': | ||
return <EmailIcon width={30} />; | ||
case 'openpassport': | ||
// TODO: Change to OpenPassportIcon | ||
return <TelegramIcon width={30} />; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change icon |
||
} | ||
}, [credential]); | ||
|
||
|
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
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
5 changes: 5 additions & 0 deletions
5
packages/@justverified/plugin/src/lib/types/credentials/openpassport-credential.ts
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,5 @@ | ||
import { CredentialSubjectValue, EthereumEip712Signature2021 } from "../ethereumEip712Signature"; | ||
export interface OpenPassportCredential extends CredentialSubjectValue{ | ||
openPassportProof: string; | ||
} | ||
export type OpenPassportEthereumEip712Signature = EthereumEip712Signature2021<OpenPassportCredential> |
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ import { | |
TelegramIcon, | ||
TwitterIcon, | ||
WebsiteIcon, | ||
XIcon | ||
XIcon, | ||
} from '@justweb3/ui'; | ||
|
||
export const getTextRecordIcon = (key: string) => { | ||
|
@@ -48,6 +48,8 @@ export const getTextRecordIcon = (key: string) => { | |
return <EmailIcon width={24} height={24} />; | ||
case 'org.telegram': | ||
return <TelegramIcon width={24} height={24} />; | ||
case 'app.openpassport': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. change icon |
||
return <TelegramIcon width={24} height={24} />; | ||
default: | ||
return ( | ||
<div | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change icon to openpassport