Skip to content

used on.confirmation to wait for 8th block to update onChain data

Antoine Estienne requested to merge waitFor7BlockConfirmationForData into master

Feature Merge Request

Related Issue

resolves #227 (closed)

Description of Feature

update assessment data (stage, assessorStages, 'data', etc) when onchain change is confirmed

used on.confirmation and waited for the 8th block to update (8 is arbitrary, do yall have a preference? I think 6 is the standard isn't it?)

Motivation and Context

before storeDataOnAssessment would wait for 'on.receipt' to fetchStoredData

'.on('receipt', (receipt) => { if (receipt.status === '0x01') { dispatch(fetchStoredData(address)) } })'

the receipt arrives before the data is 'confirmed', so the "fetchStoreData" updates data with the old data

What's Next?

Next, we should use the same trick for transaction handling


Edited by Antoine Estienne

Merge request reports