Skip to content

Commit

Permalink
chore: partial revert bump db-sync to sancho-4.1.0
Browse files Browse the repository at this point in the history
This reverts commit 30d926c.
  • Loading branch information
mirceahasegan committed May 3, 2024
1 parent d805b61 commit 39e5f21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const getGovernanceAction = ({
numerator,
type
}: ProposalProcedureModel): Cardano.GovernanceAction => {
const { contents } = description;
const { contents } = JSON.parse(description);
const governanceActionId =
contents && contents[0] ? { actionIndex: contents[0].govActionIx, id: contents[0].txId } : null;

Expand Down Expand Up @@ -155,7 +155,7 @@ const getGovernanceAction = ({
};
}

throw new Error(`Unknown GovernanceActionType '${type}' with description "${JSON.stringify(description)}"`);
throw new Error(`Unknown GovernanceActionType '${type}' with description "${description}"`);
};

const getVoter = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,28 +374,22 @@ export const findCommitteeRegistrationByTxIds = `
SELECT
cert_index,
tx.hash AS tx_id,
ch1.raw AS cold_key,
ch1.has_script AS cold_key_has_script,
ch2.raw AS hot_key,
ch2.has_script AS hot_key_has_script
cold_key,
hot_key
FROM tx
JOIN committee_registration AS cert ON cert.tx_id = tx.id
JOIN committee_hash AS ch1 ON cold_key_id = ch1.id
JOIN committee_hash AS ch2 ON hot_key_id = ch2.id
WHERE tx.id = ANY($1)
ORDER BY tx.id ASC`;

export const findCommitteeResignByTxIds = `
SELECT
cert_index,
tx.hash AS tx_id,
ch.raw AS cold_key,
ch.has_script AS cold_key_has_script,
cold_key,
url,
data_hash
FROM tx
JOIN committee_de_registration AS cert ON cert.tx_id = tx.id
JOIN committee_hash AS ch ON cold_key_id = ch.id
LEFT JOIN voting_anchor AS anchor ON anchor.id = voting_anchor_id
WHERE tx.id = ANY($1)
ORDER BY tx.id ASC`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export interface VotingProceduresModel {
export interface ProposalProcedureModel {
data_hash: Buffer;
deposit: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
description: any;
description: string;
tx_id: Buffer;
type: string;
url: string;
Expand Down

0 comments on commit 39e5f21

Please sign in to comment.