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

chore(refactor): 0.1.32 @polkadot-cloud/assets support #1561

Merged
merged 11 commits into from
Oct 28, 2023
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@ledgerhq/hw-transport-webhid": "^6.27.19",
"@polkadot-cloud/assets": "^0.1.28",
"@polkadot-cloud/assets": "^0.1.32",
"@polkadot-cloud/core": "^1.0.29",
"@polkadot-cloud/react": "^0.1.99",
"@polkadot-cloud/utils": "^0.0.23",
Expand Down
6 changes: 4 additions & 2 deletions src/modals/Connect/Extension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export const Extension = ({ meta, size, flag }: ExtensionProps) => {
);
}

const shortUrl = Array.isArray(website) ? website[0] : website;
const longUrl = Array.isArray(website) ? website[1] : website;
const disabled = extensionsStatus[id] === 'connected' || !isInstalled;

return (
Expand Down Expand Up @@ -93,11 +95,11 @@ export const Extension = ({ meta, size, flag }: ExtensionProps) => {
<div className="foot">
<a
className="link"
href={`https://${website}`}
href={`https://${longUrl}`}
target="_blank"
rel="noreferrer"
>
{website}
{shortUrl}
<FontAwesomeIcon icon={faExternalLinkAlt} transform="shrink-6" />
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/modals/Connect/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface ExtensionMetaProps {
id: string;
title: string;
status?: string;
website: string;
website: string | [string, string];
}

export interface ListWithInputProps {
Expand Down
6 changes: 6 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import type { FunctionComponent, SVGProps } from 'react';
import type { Theme } from 'contexts/Themes/types';
import type { ExtensionInjected } from '@polkadot-cloud/react/types';

declare global {
interface Window {
injectedWeb3?: Record<string, ExtensionInjected>;
}
}

declare global {
interface Window {
injectedWeb3?: Record<string, ExtensionInjected>;
Expand Down
Loading
Loading