Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop formatting app property #463

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/ingestor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { capture } from '@snapshot-labs/snapshot-sentry';
import snapshot from '@snapshot-labs/snapshot.js';
import hashTypes from '@snapshot-labs/snapshot.js/src/sign/hashedTypes.json';
import castArray from 'lodash/castArray';
import kebabCase from 'lodash/kebabCase';
import { getProposal, getSpace } from './helpers/actions';
import { isValidAlias } from './helpers/alias';
import envelope from './helpers/envelope.json';
Expand Down Expand Up @@ -151,7 +150,7 @@ export default async function ingestor(req) {
plugins: JSON.parse(message.plugins)
},
type: message.type,
app: kebabCase(message.app || '')
app: message.app || ''
};
if (type === 'alias') payload = { alias: message.alias };
if (type === 'statement')
Expand Down Expand Up @@ -200,7 +199,7 @@ export default async function ingestor(req) {
proposal: message.proposal,
choice,
reason: message.reason || '',
app: kebabCase(message.app || ''),
app: message.app || '',
metadata: jsonParse(message.metadata, {})
};
type = 'vote';
Expand Down
3 changes: 1 addition & 2 deletions src/writer/proposal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { capture } from '@snapshot-labs/snapshot-sentry';
import snapshot from '@snapshot-labs/snapshot.js';
import networks from '@snapshot-labs/snapshot.js/src/networks.json';
import kebabCase from 'lodash/kebabCase';
import { validateSpaceSettings } from './settings';
import { getSpace } from '../helpers/actions';
import { ACTIVE_PROPOSAL_BY_AUTHOR_LIMIT, getSpaceLimits } from '../helpers/limits';
Expand Down Expand Up @@ -240,7 +239,7 @@ export async function action(body, ipfs, receipt, id): Promise<void> {
quorum_type: (quorum && spaceSettings.voting?.quorumType) || '',
privacy: spaceSettings.voting?.privacy || '',
snapshot: proposalSnapshot || 0,
app: kebabCase(msg.payload.app || ''),
app: msg.payload.app,
scores: JSON.stringify([]),
scores_by_strategy: JSON.stringify([]),
scores_state: 'pending',
Expand Down
3 changes: 1 addition & 2 deletions src/writer/vote.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import snapshot from '@snapshot-labs/snapshot.js';
import kebabCase from 'lodash/kebabCase';
import { getProposal } from '../helpers/actions';
import log from '../helpers/log';
import db from '../helpers/mysql';
Expand Down Expand Up @@ -108,7 +107,7 @@ export async function action(body, ipfs, receipt, id, context): Promise<void> {
const created = parseInt(msg.timestamp);
const choice = JSON.stringify(msg.payload.choice);
const metadata = JSON.stringify(msg.payload.metadata || {});
const app = kebabCase(msg.payload.app || '');
const app = msg.payload.app;
const reason = msg.payload.reason || '';
const proposalId = msg.payload.proposal;

Expand Down
Loading