Skip to content

Commit

Permalink
Merge pull request #178 from metaDAOproject/feat/speed-up-proposals-f…
Browse files Browse the repository at this point in the history
…etch

feat/speed up proposals fetch
  • Loading branch information
LukasDeco authored Aug 2, 2024
2 parents 040ccc8 + 22d1d4d commit 1a32647
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
36 changes: 2 additions & 34 deletions lib/client/indexer/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,6 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
base_mint_acct: true,
quote_mint_acct: true,
market_type: true,
twaps: {
__args: {
limit: 1,
order_by: [
{
created_at: "desc"
}
]
},
last_observation: true,
last_price: true
},
prices: {
__args: {
limit: 1,
Expand All @@ -141,27 +129,7 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
categories: true
},
dao: {
dao_detail: {
name: true,
slug: true
},
pass_threshold_bps: true,
tokenByBaseAcct: {
mint_acct: true,
image_url: true,
decimals: true,
symbol: true,
name: true,
supply: true
},
tokenByQuoteAcct: {
mint_acct: true,
image_url: true,
decimals: true,
symbol: true,
name: true,
supply: true
},
program: {
program_acct: true,
version: true,
Expand Down Expand Up @@ -261,8 +229,8 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
)
},
dao: {
name: p.dao.dao_detail?.name ?? "",
slug: p.dao.dao_detail?.slug ?? ""
name: dao.name ?? "",
slug: dao.slug ?? ""
},
passThreshold: p.dao.pass_threshold_bps ?? 0,
passMarket: new PublicKey(passMarket.market_acct),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metadaoproject/futarchy-sdk",
"version": "4.0.0-alpha.6",
"version": "4.0.0-alpha.7",
"main": "dist",
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down

0 comments on commit 1a32647

Please sign in to comment.