Skip to content

Commit

Permalink
fix: fix missing gnosis connector
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jan 26, 2025
1 parent 8918f8c commit 3d078d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 7 additions & 5 deletions apps/ui/src/components/Connectors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ const emit = defineEmits<{
const { connectors } = useConnectors();
const availableConnectors = computed(() => {
if (!props.supportedConnectors?.length) return connectors.value;
return connectors.value.filter(connector =>
props.supportedConnectors!.includes(connector.type)
);
return connectors.value.filter(connector => {
return !(
(props.supportedConnectors &&
!props.supportedConnectors.includes(connector.type)) ||
connector.type === 'gnosis'
);
});
});
</script>

Expand Down
10 changes: 3 additions & 7 deletions apps/ui/src/composables/useConnectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Eip6963 from '@/helpers/eip6963';
import { Connector, ConnectorType } from '@/networks/types';

type ConnectorDetail = Partial<
Pick<Connector, 'id' | 'info' | 'options' | 'provider'> & { hidden?: boolean }
Pick<Connector, 'id' | 'info' | 'options' | 'provider'>
>;

const eip6963 = new Eip6963();
Expand Down Expand Up @@ -47,9 +47,7 @@ const CONNECTOR_DETAILS: Record<ConnectorType, ConnectorDetail> = {
info: {
name: 'Gnosis Safe',
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDkuMS1jMDAyIDc5LmI3YzY0Y2NmOSwgMjAyNC8wNy8xNi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jhWk10I9r3P1OdbCQ6NIDw61lORKXNSnlbiQw+MN3On2ozd3ywhub9JSfcII1TfK/Gh0iUWaXBhxv9FiJqH5EV/dkd0rNba5o5qaurvAfeGdBs1MTfo+fP/6kVHAXm2QrWARyGiGyYXfZirdh7AH3baHb+IO3Vxo40f1GS9aiKRmcJ7yXf5u5+EOvk1cF935uwHtqXtEnLuHXeRCHvmlguxnePxzDy+mm3+YavHZ5OSNT3Eu/yd8+/j0KE27mmwnGDkXcK6hjFjFC7bKBDW3DX6aqBfONajPYDW51+dPgP29Po/wX45l69CItUmh/jcB9k07MN4BHVAQpUdd21m2+58AAwCtz/ehvm2R/QAAAABJRU5ErkJggg=='
},
// Connector can not be chosen, it's used transparently when inside a safe app
hidden: true
}
},
argentx: {
info: {
Expand All @@ -71,7 +69,7 @@ export function useConnectors() {
function getConnectors(
connectorType: ConnectorType,
connector: ConnectorDetail
): ConnectorDetail[] {
): Required<ConnectorDetail>[] {
return connectorType === 'injected'
? injectedProviders.value.map(d => ({
...d,
Expand All @@ -84,8 +82,6 @@ export function useConnectors() {
return (
Object.entries(CONNECTOR_DETAILS) as [ConnectorType, ConnectorDetail][]
).flatMap(([type, detail]) => {
if (detail.hidden) return [];

return getConnectors(type, detail).map(
d =>
new connectorsClass[type](
Expand Down
4 changes: 3 additions & 1 deletion apps/ui/src/helpers/connectors/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argentx from './argentx';
import gnosis from './gnosis';
import injected from './injected';
import walletconnect from './walletconnect';
import walletlink from './walletlink';
Expand All @@ -7,5 +8,6 @@ export default {
argentx,
injected,
walletconnect,
walletlink
walletlink,
gnosis
};

0 comments on commit 3d078d1

Please sign in to comment.