mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
console.log estimateGas() result
This commit is contained in:
parent
fa6c27292c
commit
079a583041
@ -183,7 +183,15 @@ export async function estimateGas(
|
|||||||
{
|
{
|
||||||
from: from
|
from: from
|
||||||
},
|
},
|
||||||
(err, estGas) => (err ? GASLIMIT_DEFAULT : estGas)
|
(err, estGas) => {
|
||||||
|
if (err) {
|
||||||
|
console.log('ERROR ESTIMATING GAS: ' + err)
|
||||||
|
return GASLIMIT_DEFAULT
|
||||||
|
} else {
|
||||||
|
console.log('OK ESTIMATING GAS: ' + estGas)
|
||||||
|
return estGas
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
LoggerInstance.error(`ERROR: Estimate gas failed!`, e)
|
LoggerInstance.error(`ERROR: Estimate gas failed!`, e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user