Skip to content

Commit

Permalink
fix: remove grant/grant_term from inflation (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnygleason authored and mvines committed Jun 15, 2020
1 parent 97c07c7 commit e031710
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions web3.js/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ type VoteAccountStatus = {
const GetInflationResult = struct({
foundation: 'number',
foundation_term: 'number',
grant: 'number',
grant_term: 'number',
initial: 'number',
storage: 'number',
taper: 'number',
Expand Down
17 changes: 12 additions & 5 deletions web3.js/test/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ test('get inflation', async () => {
result: {
foundation: 0.05,
foundation_term: 7.0,
grant: 0.05,
grant_term: 7.0,
initial: 0.15,
storage: 0.1,
taper: 0.15,
Expand All @@ -153,9 +151,18 @@ test('get inflation', async () => {
]);

const inflation = await connection.getInflation();
expect(inflation.initial).toBeGreaterThan(0);
expect(inflation.storage).toBeGreaterThan(0);
expect(inflation.terminal).toBeGreaterThan(0);

for (const key of [
'initial',
'terminal',
'taper',
'foundation',
'foundation_term',
'storage',
]) {
expect(inflation).toHaveProperty(key);
expect(inflation[key]).toBeGreaterThan(0);
}
});

test('get slot', async () => {
Expand Down

0 comments on commit e031710

Please sign in to comment.