Skip to content

Commit

Permalink
Add slotsPerProposal to DaoAggregate daos
Browse files Browse the repository at this point in the history
  • Loading branch information
metaproph3t committed May 17, 2024
1 parent 708c401 commit e3b462d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/client/rpc/dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,17 @@ export class FutarchyRPCDaoClient implements FutarchyDaoClient {
const baseMint = ["V0", "V0.1", "V0.2"].includes(protocol.deploymentVersion)
? daoAccount.metaMint
: daoAccount.tokenMint;
const slotsPerProposal: BN =
protocol.deploymentVersion === "V0"
? new BN(2160000)
: daoAccount.slotsPerProposal;
const quoteMint = daoAccount.usdcMint;
if (baseMint) {
const baseToken = await enrichTokenMetadata(baseMint, this.rpcProvider);
const quoteToken = await enrichTokenMetadata(quoteMint, this.rpcProvider);
const dao = {
...daoAccount,
slotsPerProposal,
tokenMint: daoAccount.tokenMint
? daoAccount.tokenMint
: new PublicKey(daoAccount.metaMint ?? "")
Expand Down
2 changes: 1 addition & 1 deletion lib/types/autocrats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type Dao = {
publicKey: PublicKey;
daoAccount: Pick<
DaoAccount,
"treasury" | "tokenMint" | "usdcMint" | "proposalCount" | "metaMint"
"treasury" | "tokenMint" | "usdcMint" | "proposalCount" | "metaMint" | "slotsPerProposal"
>;
baseToken: Omit<TokenProps, "name" | "publicKey" | "url"> & {
name: string | null;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metadaoproject/futarchy-sdk",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"main": "dist",
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down

0 comments on commit e3b462d

Please sign in to comment.