Skip to content

Commit

Permalink
fix: [lw-11877]: resolve pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vetalcore committed Nov 29, 2024
1 parent 21a0293 commit 43794a8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/nami/src/ui/app/pages/dapp-connector/signTxUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,22 @@ const toAssetInfo = (
return toAsset(assetInfo, BigInt(cardanoAsset.quantity));
};

const ConwayEraGovernanceCertificates = new Set(
Object.values(ConwayEraCertificatesTypes).filter(
certificate =>
![
ConwayEraCertificatesTypes.Registration,
ConwayEraCertificatesTypes.Unregistration,
ConwayEraCertificatesTypes.StakeRegistrationDelegation,
].includes(certificate),
),
);

export const txHasGovernanceFields = ({
body: { certificates, votingProcedures, proposalProcedures },
}: Wallet.Cardano.Tx) =>
certificates?.some(certificate =>
Object.values(ConwayEraCertificatesTypes).includes(
ConwayEraGovernanceCertificates.has(
certificate.__typename as unknown as ConwayEraCertificatesTypes,
),
) ||
Expand Down

0 comments on commit 43794a8

Please sign in to comment.