Skip to content

Commit

Permalink
chore(refactor): 0.1.32 @polkadot-cloud/assets support (#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat authored Oct 28, 2023
1 parent 0571eed commit 21a2f53
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 150 deletions.
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

0 comments on commit 21a2f53

Please sign in to comment.