Skip to content

Commit

Permalink
Merge pull request #792 from haqq-network/dev
Browse files Browse the repository at this point in the history
release
  • Loading branch information
kioqq authored Apr 25, 2024
2 parents 5d77b2a + b665a57 commit e021c13
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion libs/data-access/cosmos/src/lib/data-access-cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ export function createCosmosService(cosmosRestEndpoint: string): CosmosService {
}

async function getProposalTally(id: string) {
console.log('getProposalTally', { id });
const getProposalTallyUrl = new URL(
`${cosmosRestEndpoint}${generateEndpointProposalTally(id)}`,
);
Expand Down
3 changes: 2 additions & 1 deletion libs/shell/governance/src/lib/proposal-details-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ export function ProposalDetailsComponent({

const voted = Number.parseInt(
formatUnits(
BigInt(proposalTally.no) +
BigInt(proposalTally.abstain) +
BigInt(proposalTally.no) +
BigInt(proposalTally.no_with_veto) +
BigInt(proposalTally.yes),
18,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export function useAuthzActions(): AuthzActionsHook {
const { haqqAddress, ethAddress } = useAddress();
const chains = useSupportedChains();
const { chain = chains[0] } = useNetwork();
const chainParams = getChainParams(chain.id);
const chainParams = getChainParams(
chain.unsupported !== undefined && !chain.unsupported
? chain.id
: chains[0].id,
);
const haqqChain = mapToCosmosChain(chainParams);

const handleGrant = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ export function useProposalActions(): ProposalActionsHook {
const chains = useSupportedChains();
const { haqqAddress, ethAddress } = useAddress();
const { chain = chains[0] } = useNetwork();
const chainParams = getChainParams(chain.id);
const chainParams = getChainParams(
chain.unsupported !== undefined && !chain.unsupported
? chain.id
: chains[0].id,
);
const haqqChain = mapToCosmosChain(chainParams);

const handleVote = useCallback(
Expand All @@ -56,7 +60,6 @@ export function useProposalActions(): ProposalActionsHook {
option: number,
estimatedFee?: EstimatedFeeResponse,
) => {
console.log('handleVote', { proposalId, option });
const pubkey = await getPubkey(ethAddress as string);
const sender = await getSender(haqqAddress as string, pubkey);
const memo = `Vote for proposal #${proposalId}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function ProposalVoteProgress({
};
}, [results]);

const [yesPercents, abstainPercents, noPercents, vetoPercents] =
const [yesPercents, noPercents, abstainPercents, vetoPercents] =
useMemo(() => {
if (total === 0) {
return [0, 0, 0, 0];
Expand Down

1 comment on commit e021c13

@vercel
Copy link

@vercel vercel bot commented on e021c13 Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.