Skip to content

Commit

Permalink
return undefined if dao does not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMayflower committed May 23, 2021
1 parent dfbc5eb commit 8174e9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BigNumberish } from "@ethersproject/bignumber";
import { Contract, ethers, Signer } from "ethers";
import { constants, ethers, Signer } from "ethers";
import deployedContract from "../deployed.json";
import {
COMMIT,
Expand Down Expand Up @@ -266,6 +266,7 @@ export class WorkhardClient {
}
): Promise<WorkhardDAO | undefined> => {
const contracts = await this.workhard.getDAO(id);
if (contracts.timelock === constants.AddressZero) return undefined;
const connector = option?.account || this.signer || this.workhard.provider;
let multisig = GnosisSafe__factory.connect(contracts.multisig, connector);
let baseCurrency = IERC20__factory.connect(
Expand Down

0 comments on commit 8174e9a

Please sign in to comment.