Skip to content

Commit

Permalink
fix: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jan 26, 2025
1 parent 186919b commit 7f28479
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions apps/ui/src/components/CreateDeploymentProgress.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { shorten } from '@/helpers/utils';
import { getNetwork } from '@/networks';
import { ConnectorType, StrategyConfig } from '@/networks/types';
import { Connector, ConnectorType, StrategyConfig } from '@/networks/types';
import { NetworkID, SpaceMetadata, SpaceSettings } from '@/types';
type DeployingDependencyStep = {
Expand Down Expand Up @@ -49,14 +49,14 @@ const emit = defineEmits<{
}>();
const { deployDependency, createSpace } = useActions();
const { login } = useWeb3();
const { login, connector } = useWeb3();
const currentStep = ref(0);
const completed = ref(false);
const failed = ref(false);
const connectorModalOpen = ref(false);
const connectorModalConnectors = ref([] as ConnectorType[]);
const connectorCallbackFn: Ref<((value: string | false) => void) | null> =
const connectorCallbackFn: Ref<((value: Connector | false) => void) | null> =
ref(null);
const txIds = ref({});
const deployedExecutionStrategies = ref([] as StrategyConfig[]);
Expand Down Expand Up @@ -105,7 +105,7 @@ function getConnector(supportedConnectors: ConnectorType[]) {
connectorModalOpen.value = true;
connectorModalConnectors.value = supportedConnectors;
return new Promise<string | false>(resolve => {
return new Promise<Connector | false>(resolve => {
connectorCallbackFn.value = resolve;
});
}
Expand Down Expand Up @@ -134,11 +134,11 @@ async function deployStep(
? step.strategy.deployConnectors
: network.value.managerConnectors;
if (!supportedConnectors.includes(connector.value.type)) {
const connector = await getConnector(supportedConnectors);
if (!connector) throw new Error('No connector selected');
if (!connector.value || !supportedConnectors.includes(connector.value.type)) {
const selectedConnector = await getConnector(supportedConnectors);
if (!selectedConnector) throw new Error('No connector selected');
await login(connector);
await login(selectedConnector);
}
let result;
Expand Down
4 changes: 2 additions & 2 deletions apps/ui/src/helpers/connectors/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export default class {
public type: ConnectorType;
public info: Connector['info'];
public options: Connector['options'];
public provider: any;
public provider: Connector['provider'];

constructor(
id: string,
type: ConnectorType,
info: Connector['info'],
options: Connector['options'],
provider: any
provider: Connector['provider']
) {
this.id = id;
this.info = info;
Expand Down

0 comments on commit 7f28479

Please sign in to comment.