2018-10-22 15:31:56 -07:00
|
|
|
// @flow
|
|
|
|
|
2018-11-04 11:41:21 -08:00
|
|
|
import {Account} from '../../src';
|
2018-10-22 15:31:56 -07:00
|
|
|
import {url} from '../url';
|
|
|
|
import {mockRpc} from '../__mocks__/node-fetch';
|
|
|
|
|
2019-03-04 08:06:33 -08:00
|
|
|
export function mockGetRecentBlockhash() {
|
|
|
|
const recentBlockhash = new Account();
|
2018-10-22 15:31:56 -07:00
|
|
|
|
|
|
|
mockRpc.push([
|
|
|
|
url,
|
|
|
|
{
|
2019-03-04 08:06:33 -08:00
|
|
|
method: 'getRecentBlockhash',
|
2018-10-22 15:31:56 -07:00
|
|
|
params: [],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
error: null,
|
2019-05-08 17:41:07 -07:00
|
|
|
result: [
|
|
|
|
recentBlockhash.publicKey.toBase58(),
|
2019-05-23 10:44:55 -06:00
|
|
|
{
|
2019-06-12 14:36:05 -07:00
|
|
|
lamportsPerSignature: 42,
|
2019-06-26 13:49:29 -07:00
|
|
|
burnPercent: 50,
|
|
|
|
maxLamportsPerSignature: 42,
|
|
|
|
minLamportsPerSignature: 42,
|
|
|
|
targetLamportsPerSignature: 42,
|
|
|
|
targetSignaturesPerSlot: 42,
|
2019-05-23 10:44:55 -06:00
|
|
|
},
|
|
|
|
],
|
2018-11-04 11:41:21 -08:00
|
|
|
},
|
2018-10-22 15:31:56 -07:00
|
|
|
]);
|
|
|
|
}
|