Skip to content

Commit

Permalink
fix: hide JoyID connector
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonn committed Feb 8, 2024
1 parent 0d95ee8 commit 2798906
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ConnectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export default function ConnectModal(props: ConnectModalProps) {
}
};

const visibleConnectors = connectors.filter((connector) => connector.visible !== false);

return (
<Flex direction="column" gap="md">
{connectors.map((connector) => (
{visibleConnectors.map((connector) => (
<Button
key={connector.type}
className={classes.button}
Expand Down
1 change: 1 addition & 0 deletions src/connectors/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default abstract class CKBConnector {
protected store = store;
abstract type: string;
abstract icon: string;
abstract visible?: boolean;

protected set isConnected(val: boolean) {
this._isConnected = val;
Expand Down
1 change: 1 addition & 0 deletions src/connectors/joyId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { bytes } from '@ckb-lumos/codec';
export default class JoyIdConnector extends CKBConnector {
public type: string = 'JoyID';
public icon = '/images/joyid-icon.png';
public visible = false;

constructor() {
super();
Expand Down

0 comments on commit 2798906

Please sign in to comment.