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

Display the optional name for ID providers when present #470

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/browser-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Display the optional name for ID providers when present, otherwise fallback to the chain name.
- Remove check for redirectUri when launching identity issuance. This check was causing issues with an upcoming identity provider and seems to provide no value.
- Increased padding for QR code background. In dark mode, QR code not blending with background.
- Added new option to edit account name. Name saved in local storage. Changed name displayed across all BrowserWallet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ function IdentityIssuanceStart({ onStart, onError }: InnerProps) {
className="identity-issuance__provider-button flex justify-space-between align-center"
width="wide"
disabled={buttonDisabled}
key={p.ipInfo.ipIdentity + p.ipInfo.ipDescription.name}
key={p.metadata.issuanceStart}
onClick={() => startIssuance(p).catch((e) => onError(e.toString()))}
>
<IdentityProviderIcon provider={p} />
{p.ipInfo.ipDescription.name}
{p.metadata.display ?? p.ipInfo.ipDescription.name}
</Button>
))}
</div>
Expand Down
6 changes: 6 additions & 0 deletions packages/browser-wallet/src/shared/storage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,15 @@ export interface IpInfo {
* but is not contained in IpInfo.
*/
export interface IdentityProviderMetaData {
/** Optional string to use for displaying the ID Provider, when not present fallback to `ipDescription.name` */
display?: string;
/** URL for initiating identity issuance for this ID provider. */
issuanceStart: string;
/** URL for recovering identities from this ID provider. */
recoveryStart: string;
/** A PNG image to display, encoded in base64. */
icon: string;
/** Support Email address of this ID provider. */
support: string;
}

Expand Down
Loading