Skip to content

Commit

Permalink
refactor(cardano-services-client): use CIP129 when querying dreps/:dr…
Browse files Browse the repository at this point in the history
…epId
  • Loading branch information
mirceahasegan committed Feb 11, 2025
1 parent a6c65fa commit 9b832ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export class BlockfrostDRepProvider extends BlockfrostProvider implements DRepPr

async getDRepInfo({ id }: GetDRepInfoArgs): Promise<DRepInfo> {
try {
const cip105DRepId = Cardano.DRepID.toCip105DRepID(id); // Blockfrost only supports CIP-105 DRep IDs
const response = await this.request<Responses['drep']>(`governance/dreps/${cip105DRepId.toString()}`);
const cip129DRepId = Cardano.DRepID.toCip129DRepID(id).toString();
const response = await this.request<Responses['drep']>(`governance/dreps/${cip129DRepId.toString()}`);
const amount = BigInt(response.amount);
const activeEpoch = response.active_epoch ? Cardano.EpochNo(response.active_epoch) : undefined;
const active = response.active;
Expand Down

0 comments on commit 9b832ed

Please sign in to comment.