Skip to content

Commit

Permalink
Merge pull request #143 from TosiDrop/GH-135-params-from-koios
Browse files Browse the repository at this point in the history
feat/client: add function for getepochparams
  • Loading branch information
wolf31o2 authored May 28, 2022
2 parents 17c4cb7 + 0cdfdb6 commit d60ab24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/services/http.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
PaymentTransactionHashRequest,
TokenTransactionHashRequest,
} from "src/entities/common.entities";
import { TransactionStatus } from "src/entities/koios.entities";
import { EpochParams, TransactionStatus } from "src/entities/koios.entities";
import { GetRewards, GetCustomRewards } from "../entities/vm.entities";
import axios from "axios";

Expand Down Expand Up @@ -75,6 +75,11 @@ export async function getBlock(): Promise<{ block_no: number }> {
return { block_no: 0 };
}

export async function getEpochParams(): Promise<EpochParams[]> {
const response = await axios.get(`/getepochparams`);
return response.data;
}

export async function getNetworkId(): Promise<{ network: NetworkId }> {
const response = await axios.get(`/features`);
if (response && response.data) {
Expand Down

0 comments on commit d60ab24

Please sign in to comment.