diff --git a/packages/ui-components/src/lib/components/deployment/DeploymentSteps.svelte b/packages/ui-components/src/lib/components/deployment/DeploymentSteps.svelte index 7b8fe0f78..de13b4f6c 100644 --- a/packages/ui-components/src/lib/components/deployment/DeploymentSteps.svelte +++ b/packages/ui-components/src/lib/components/deployment/DeploymentSteps.svelte @@ -204,6 +204,11 @@ return; } + if (!networkKey) { + error = DeploymentStepErrors.NO_CHAIN; + return; + } + let result: HandleAddOrderResult | null = null; checkingDeployment = true; @@ -225,9 +230,15 @@ checkingDeployment = false; const onAccept = () => { + if (!networkKey) { + error = DeploymentStepErrors.NO_CHAIN; + return; + } + handleDeployModal({ ...result, - subgraphUrl: subgraphUrl + subgraphUrl: subgraphUrl, + network: networkKey }); }; diff --git a/packages/ui-components/src/lib/stores/transactionStore.ts b/packages/ui-components/src/lib/stores/transactionStore.ts index f3bddf396..a8bb7ff61 100644 --- a/packages/ui-components/src/lib/stores/transactionStore.ts +++ b/packages/ui-components/src/lib/stores/transactionStore.ts @@ -50,7 +50,7 @@ export type DeploymentTransactionArgs = { orderbookAddress: Hex; chainId: number; subgraphUrl: string; - network?: string; + network: string; }; export type DepositOrWithdrawTransactionArgs = { diff --git a/packages/ui-components/src/lib/types/transaction.ts b/packages/ui-components/src/lib/types/transaction.ts index e2bfc3da0..70945a7ae 100644 --- a/packages/ui-components/src/lib/types/transaction.ts +++ b/packages/ui-components/src/lib/types/transaction.ts @@ -8,4 +8,5 @@ export type DeploymentArgs = { orderbookAddress: Hex; chainId: number; subgraphUrl: string; + network: string; }; diff --git a/packages/webapp/src/lib/components/DeployModal.svelte b/packages/webapp/src/lib/components/DeployModal.svelte index e5d379320..1efc6849e 100644 --- a/packages/webapp/src/lib/components/DeployModal.svelte +++ b/packages/webapp/src/lib/components/DeployModal.svelte @@ -14,7 +14,7 @@ export let orderbookAddress: Hex; export let chainId: number; export let subgraphUrl: string; - export let network: string | undefined = undefined; + export let network: string; const messages = { success: 'Your strategy was successfully deployed.',