diff --git a/src/client.ts b/src/client.ts index 5a9b57f..9fb4d4b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -240,6 +240,8 @@ export class RelayClient { */ public async deploy(): Promise { this.signerNeeded(); + this.mustBeSafe(); + const safe = await this.getExpectedSafe(); const deployed = await this.getDeployed(safe); @@ -394,6 +396,12 @@ export class RelayClient { } } + private mustBeSafe(): void { + if (this.relayTxType != RelayerTxType.SAFE) { + throw new Error("operation only supported for safe tx type"); + } + } + private async getExpectedSafe(): Promise { const address = await (this.signer as IAbstractSigner).getAddress(); return deriveSafe(address, this.contractConfig.SafeContracts.SafeFactory);