Skip to content

Commit dc5c83f

Browse files
committed
Fix start ts on create proposal
1 parent 822a7d5 commit dc5c83f

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

scripts/bulk-create-proposal.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
} from "@helium/hpl-crons-sdk";
2424
import { init as initHsd, daoKey } from "@helium/helium-sub-daos-sdk";
2525
import { HNT_MINT } from "@helium/spl-utils";
26+
import { BN } from "@coral-xyz/anchor";
2627

2728
interface Choice {
2829
uri: string;
@@ -144,7 +145,11 @@ export async function run(args: any = process.argv) {
144145
const { instruction: setState } = await stateProgram.methods
145146
// @ts-ignore
146147
.updateStateV0({
147-
newState: { voting: {} },
148+
newState: {
149+
voting: {
150+
startTs: new BN(Date.now() / 1000).toNumber()
151+
}
152+
},
148153
})
149154
.accountsPartial({
150155
proposal,

scripts/create-proposal.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ export async function run(args: any = process.argv) {
129129
const { instruction: setState } = await stateProgram.methods
130130
// @ts-ignore
131131
.updateStateV0({
132-
newState: { voting: {} },
132+
newState: {
133+
voting: {
134+
startTs: new anchor.BN(Date.now() / 1000).toNumber()
135+
}
136+
},
133137
})
134138
.accountsStrict({
135139
proposal: proposal!,

0 commit comments

Comments
 (0)