fix: wait for the next lastId before sending a new transaction

This commit is contained in:
Michael Vines
2018-10-22 15:31:56 -07:00
parent d9b98918b6
commit 9c8cc0bd24
4 changed files with 50 additions and 39 deletions

View File

@ -0,0 +1,23 @@
// @flow
import {
Account,
} from '../../src';
import {url} from '../url';
import {mockRpc} from '../__mocks__/node-fetch';
export function mockGetLastId() {
const lastId = new Account();
mockRpc.push([
url,
{
method: 'getLastId',
params: [],
},
{
error: null,
result: lastId.publicKey.toBase58(),
}
]);
}