Rename to isFirstGetTransactionCount
assign nextPrefixedHexNonce as a const
This commit is contained in:
Jacob Evans
2018-02-06 11:28:40 -08:00
parent 67d7540907
commit df8de7ff51
2 changed files with 8 additions and 7 deletions

View File

@@ -38,13 +38,13 @@ describe('NonceTrackerSubprovider', () => {
'0x5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13',
];
function createFixtureSubprovider() {
let firstGetTransactionCount = true;
let isFirstGetTransactionCount = true;
const fixedBlockNumberAndTransactionCountProvider = new FixtureSubprovider({
eth_getBlockByNumber: '0x01',
eth_getTransactionCount: (data: any, next: any, end: any) => {
// For testing caching we return different results on the second call
if (firstGetTransactionCount) {
firstGetTransactionCount = false;
if (isFirstGetTransactionCount) {
isFirstGetTransactionCount = false;
end(null, '0x00');
} else {
end(null, '0x99');