Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
cgilbe27 committed Apr 16, 2024
1 parent 7c18c0d commit 11c5925
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gql/heart-monitor/heart-monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import {
defaultAccountLinksInfo,
defaultProxy,
GQLProxies,
defaultInflationReward,
} from ".."

const nibiruUrl = "testnet-1"
Expand Down Expand Up @@ -330,7 +331,10 @@ const testInflation = async (
if (resp.inflation) {
const { inflation } = resp

checkFields([inflation], ["distributions", "inflations"])
checkFields(
[inflation],
["distributions", "inflations", ...(fields?.rewards ? ["rewards"] : [])]
)
}
}

Expand All @@ -348,6 +352,7 @@ test("inflation", async () => {
{
inflations: defaultInflationInfo,
distributions: defaultInflationDistribution,
rewards: defaultInflationReward,
}
)
})
Expand Down
5 changes: 5 additions & 0 deletions src/gql/utils/defaultObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
GQLIbcTransfer,
GQLInflationDistribution,
GQLInflationInfo,
GQLInflationRewards,
GQLLike,
GQLMarkPriceCandle,
GQLNibiruTweet,
Expand Down Expand Up @@ -431,6 +432,10 @@ export const defaultInflationDistribution: GQLInflationDistribution = {
strategicReserve: 0,
txSeqNo: 0,
}
export const defaultInflationReward: GQLInflationRewards = {
annualReward: 0,
totalStaked: 0,
}

export const defaultInflationInfo: GQLInflationInfo = {
amount: 0,
Expand Down

0 comments on commit 11c5925

Please sign in to comment.