Skip to content

Commit 34653fd

Browse files
authored
fix: mf-6774 snapshot box proposal rendering (#12357)
1 parent 9bff15f commit 34653fd

File tree

2 files changed

+197
-125
lines changed

2 files changed

+197
-125
lines changed

packages/plugins/Snapshot/src/Worker/apis.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ChainId } from '@masknet/web3-shared-evm'
22
import { SNAPSHOT_RELAY_URL, SNAPSHOT_SEQ_URL } from '../constants.js'
33
import type { HubProposal, Proposal, RawVote, VoteResult } from '../types.js'
4-
import { formatBoxProposal, fetchProposalFromBoxApi, fetchVotesFromBox, formatBoxVote } from './box.js'
4+
import { fetchProposalFromBoxApi, fetchVotesFromBox, formatBoxVote } from './box.js'
55

66
export async function fetchProposal(id: string) {
77
const proposal = await fetchProposalFromGraphql(id)
@@ -82,8 +82,7 @@ async function fetchVotesFromGraphql(id: string, first: number, skip: number, sp
8282

8383
async function fetchProposalFromGraphql(id: string): Promise<HubProposal> {
8484
if (id.includes('/')) {
85-
const proposal = await fetchProposalFromBoxApi(id)
86-
return formatBoxProposal(proposal.proposal)
85+
return fetchProposalFromBoxApi(id)
8786
}
8887
const response = await fetch('https://hub.snapshot.org/graphql', {
8988
method: 'POST',

0 commit comments

Comments
 (0)