Skip to content

Commit

Permalink
feat(whale-api): add GET api for on-chain governance (#1970)
Browse files Browse the repository at this point in the history
<!--  Thanks for sending a pull request! -->

#### What this PR does / why we need it:
- Add `/proposals`, `/proposals/:id` and `/proposals/:id/votes`
endpoints on whale
- Add `.listGovProposals()`, `.getGovProposal()`, and
`listGovProposalVotes()` to `WhaleApiClient`
- To allow straightforward paginated listing implementation for
downstream, e.g. scan and wallet

#### Which issue(s) does this PR fixes?:
<!--
(Optional) Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #

#### Additional comments?:
- Intermittent codecov issue when running CI, seems to be related to
codecov/codecov-action#598

Co-authored-by: Harsh <[email protected]>
Co-authored-by: Harsh R <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2023
1 parent cd15f47 commit d8260a9
Show file tree
Hide file tree
Showing 10 changed files with 1,171 additions and 5 deletions.
8 changes: 6 additions & 2 deletions apps/whale-api/src/module.api/_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import { LegacySubgraphService } from './legacy.subgraph.service'
import { PoolPairFeesService } from './poolpair.fees.service'
import { ConsortiumController } from './consortium.controller'
import { ConsortiumService } from './consortium.service'
import { GovernanceController } from './governance.controller'
import { GovernanceService } from './governance.service'

/**
* Exposed ApiModule for public interfacing
Expand All @@ -59,7 +61,8 @@ import { ConsortiumService } from './consortium.service'
RawtxController,
LoanController,
LegacyController,
ConsortiumController
ConsortiumController,
GovernanceController
],
providers: [
{
Expand Down Expand Up @@ -104,7 +107,8 @@ import { ConsortiumService } from './consortium.service'
inject: [ConfigService]
},
LegacySubgraphService,
ConsortiumService
ConsortiumService,
GovernanceService
],
exports: [
DeFiDCache
Expand Down
Loading

0 comments on commit d8260a9

Please sign in to comment.