// In your functional component or elsehwere
const onEstimateReceiver = (estimationData) => {
console.log(
'This is the cost estimate for all the batches',
estimationData,
);
}
// In your render or as a component...
<EtherspotBatches skip={true} onEstimated={onEstimateReceiver}>
<EtherspotBatch>
<EtherspotTransaction to={address0} value={amount0} />
</EtherspotBatch>
<EtherspotBatch>
<EtherspotTransaction to={address1} value={amount1} />
<EtherspotTransaction to={address2} value={amount2} />
</EtherspotBatch>
</EtherspotBatches>