Promisify web3 sync requests in tests (#1009)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
import { ethGetBlock } from './web3';
|
||||
|
||||
// Returns the time of the last mined block in seconds
|
||||
export default function latestTime () {
|
||||
return web3.eth.getBlock('latest').timestamp;
|
||||
export default async function latestTime () {
|
||||
const block = await ethGetBlock('latest');
|
||||
return block.timestamp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user