feat: expose feeCalculator

This commit is contained in:
Michael Vines
2019-06-12 14:36:05 -07:00
parent 9fde1eb404
commit 10e3a26338
7 changed files with 91 additions and 20 deletions

View File

@ -204,8 +204,12 @@ test('get recent blockhash', async () => {
mockGetRecentBlockhash();
const recentBlockhash = await connection.getRecentBlockhash();
const [
recentBlockhash,
feeCalculator,
] = await connection.getRecentBlockhash();
expect(recentBlockhash.length).toBeGreaterThanOrEqual(43);
expect(feeCalculator.lamportsPerSignature).toBeGreaterThanOrEqual(0);
});
test('request airdrop', async () => {
@ -482,7 +486,9 @@ test('multi-instruction transaction', async () => {
accountFrom.publicKey,
accountTo.publicKey,
100,
).add(SystemProgram.transfer(accountTo.publicKey, accountFrom.publicKey, 100));
).add(
SystemProgram.transfer(accountTo.publicKey, accountFrom.publicKey, 100),
);
const signature = await connection.sendTransaction(
transaction,
accountFrom,