Skip to content

Commit

Permalink
feat: add ConstantsResponseProto021 to ConstantsResponse
Browse files Browse the repository at this point in the history
fix #3037
  • Loading branch information
hui-an-yang committed Sep 6, 2024
1 parent 592ae27 commit cd127ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Protocols } from "@taquito/taquito";
import { CONFIGS, NetworkType } from "../../config";
import BigNumber from 'bignumber.js';
import { ConstantsResponseProto019, ConstantsResponseProto020 } from '@taquito/rpc';
import { ConstantsResponseProto020, ConstantsResponseProto021 } from '@taquito/rpc';

CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
const Tezos = lib;
Expand Down Expand Up @@ -307,7 +307,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
betanet(`should successfully fetch all constants for Betanet
using ${rpc}`, async () => {
Tezos.setRpcProvider(rpc);
const constants: ConstantsResponseProto020 = await Tezos.rpc.getConstants();
const constants: ConstantsResponseProto021 = await Tezos.rpc.getConstants();
expect(constants).toEqual({
adaptive_issuance_activation_vote_enable: true,
adaptive_issuance_force_activation: false,
Expand Down Expand Up @@ -454,7 +454,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {

weeklynet(`should successfully fetch all constants for weeklynet using ${rpc}`, async () => {
Tezos.setRpcProvider(rpc);
const constants: ConstantsResponseProto020 = await Tezos.rpc.getConstants();
const constants: ConstantsResponseProto021 = await Tezos.rpc.getConstants();

expect(constants).toEqual({
adaptive_issuance_activation_vote_enable: true,
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const betanetSecretKey: Config =
defaultConfig({
networkName: 'BETANET',
protocol: Protocols.PtBetaaEZ,
defaultRpc: ' https://rpc.betanet-2024-08-29.teztnets.com',
defaultRpc: 'https://rpc.betanet-2024-08-29.teztnets.com',
knownContracts: knownContractsPtBetaaEZ,
signerConfig: defaultSecretKey
})
Expand Down
3 changes: 3 additions & 0 deletions packages/taquito-rpc/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,7 @@ export interface OperationContentsAndResultMetadataOrigination {
}

export type ConstantsResponse = ConstantsResponseCommon &
ConstantsResponseProto021 &
ConstantsResponseProto020 &
ConstantsResponseProto019 &
ConstantsResponseProto017 &
Expand Down Expand Up @@ -1828,6 +1829,8 @@ export interface ConstantsResponseCommon {

export type Ratio = { numerator: number; denominator: number };

export type ConstantsResponseProto021 = ConstantsResponseProto020;

export interface ConstantsResponseProto020
extends Omit<
ConstantsResponseProto019,
Expand Down

0 comments on commit cd127ce

Please sign in to comment.