Skip to content

Commit

Permalink
Merge pull request #2629 from decentdao/eng-2/Unable-to-create-ERC-20…
Browse files Browse the repository at this point in the history
…-DAO-on-dev

`[Eng-2]` Unable to create ERC-20 DAO on dev
  • Loading branch information
adamgall authored Dec 13, 2024
2 parents 55f2429 + 8908b6f commit 5822b54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/models/AzoriusTxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,13 @@ export class AzoriusTxBuilder extends BaseTxBuilder {

if (daoData.votingStrategyType === VotingStrategyType.LINEAR_ERC20) {
daoData = daoData as AzoriusERC20DAO;
if (daoData.isVotesToken) {
this.predictedTokenAddress = daoData.tokenImportAddress as Address;
if (!daoData.isTokenImported) {
this.setEncodedSetupTokenData();
this.setPredictedTokenAddress();
} else {
if (daoData.isVotesToken) {
this.predictedTokenAddress = daoData.tokenImportAddress as Address;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/models/DaoTxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class DaoTxBuilder extends BaseTxBuilder {
]);

// build token if token is not imported
if (data.isVotesToken && data.votingStrategyType === VotingStrategyType.LINEAR_ERC20) {
if (!data.isTokenImported && data.votingStrategyType === VotingStrategyType.LINEAR_ERC20) {
txs.push(azoriusTxBuilder.buildCreateTokenTx());
}

Expand Down

0 comments on commit 5822b54

Please sign in to comment.