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

Scroll fixes 2 #657

Merged
merged 2 commits into from
Dec 6, 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
12 changes: 9 additions & 3 deletions src/app/api/common/delegates/getDelegates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ async function getDelegate(addressOrENSName: string): Promise<Delegate> {
WHERE to_delegate=$1 OR from_delegate=$1`;
} else if (contracts.token.isERC721()) {
numOfDirectDelegationsQuery = `with latest_delegations AS (
SELECT DISTINCT ON (delegator)
SELECT DISTINCT ON (delegator)
delegator,
to_delegate,
chain_id,
Expand All @@ -413,7 +413,7 @@ async function getDelegate(addressOrENSName: string): Promise<Delegate> {
block_number DESC,
transaction_index DESC,
log_index DESC)

SELECT count(*) as num_of_delegators from latest_delegations where to_delegate = LOWER($1);`;
} else {
throw new Error("Token contract is neither ERC20 nor ERC721?");
Expand Down Expand Up @@ -516,7 +516,13 @@ async function getVoterStats(addressOrENSName: string): Promise<any> {
contracts.governor.address
);

return statsQuery?.[0] || undefined;
return (
statsQuery?.[0] || {
voter: address,
participation_rate: 0,
last_10_props: 0,
}
);
}

export const fetchDelegates = cache(getDelegates);
Expand Down
10 changes: 5 additions & 5 deletions src/lib/tenant/configs/ui/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ export const scrollTenantUIConfig = new TenantUI({
prodAddress: "0xe5bAF6359d200C144A9e52E3361efA6Dc5780cC9",
testnetAddress: "0x678dEbd4B7bEB0412B2848FfEcbE761D39b961c4",
},
{
type: ProposalType?.OPTIMISTIC,
prodAddress: "0x89c4C0E77f7876415d07a2e43E5e9a6A4Cab3538",
testnetAddress: "0x5fA0a34a3262d646E7e28a621F631bBA5Ae029c5",
},
// {
// type: ProposalType?.OPTIMISTIC,
// prodAddress: "0x89c4C0E77f7876415d07a2e43E5e9a6A4Cab3538",
// testnetAddress: "0x5fA0a34a3262d646E7e28a621F631bBA5Ae029c5",
// },
],
copy: {
helperText: `
Expand Down
Loading