Expose getTotalSupply RPC method (#370)

This commit is contained in:
Trent Nelson
2019-06-25 09:31:22 -06:00
committed by Michael Vines
parent fd2ddef520
commit 034f31d3bc
3 changed files with 38 additions and 0 deletions

View File

@ -199,6 +199,25 @@ test('get transaction count', async () => {
expect(count).toBeGreaterThanOrEqual(0);
});
test('get total supply', async () => {
const connection = new Connection(url);
mockRpc.push([
url,
{
method: 'getTotalSupply',
params: [],
},
{
error: null,
result: 1000000,
},
]);
const count = await connection.getTotalSupply();
expect(count).toBeGreaterThanOrEqual(0);
});
test('get recent blockhash', async () => {
const connection = new Connection(url);