Skip to content

Commit

Permalink
Fix bad query for proposal submit
Browse files Browse the repository at this point in the history
  • Loading branch information
plaidfinch committed Jul 16, 2024
1 parent 0a0a171 commit 1344ad2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crates/bin/pindexer/src/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ impl AppView for GovernanceProposals {
id SERIAL PRIMARY KEY,
proposal_id INTEGER NOT NULL UNIQUE,
title TEXT NOT NULL,
description TEXT,
description TEXT NOT NULL,
kind JSONB NOT NULL,
payload JSONB,
start_block_height BIGINT,
end_block_height BIGINT,
start_position BIGINT,
start_block_height BIGINT NOT NULL,
end_block_height BIGINT NOT NULL,
state JSONB NOT NULL,
proposal_deposit_amount BIGINT,
proposal_deposit_amount BIGINT NOT NULL,
withdrawn BOOLEAN DEFAULT FALSE,
withdrawal_reason TEXT
",
Expand Down Expand Up @@ -348,9 +347,9 @@ async fn handle_proposal_submit(
) -> Result<()> {
sqlx::query(
"INSERT INTO governance_proposals (
proposal_id, title, description, kind, payload, start_block_height, end_block_height, start_position, state, proposal_deposit_amount
proposal_id, title, description, kind, payload, start_block_height, end_block_height, state, proposal_deposit_amount
)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
ON CONFLICT (proposal_id) DO NOTHING",
)
.bind(proposal.id as i64)
Expand Down

0 comments on commit 1344ad2

Please sign in to comment.