mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
improve calculation of TX mined (#886)
This commit is contained in:
parent
4969db8f61
commit
abb600d837
@ -252,12 +252,17 @@ const SafeDeployment = ({ creationTxHash, onCancel, onRetry, onSuccess, provider
|
|||||||
const isTxMined = async (txHash) => {
|
const isTxMined = async (txHash) => {
|
||||||
const web3 = getWeb3()
|
const web3 = getWeb3()
|
||||||
|
|
||||||
|
const txResult = await web3.eth.getTransaction(txHash)
|
||||||
|
if (txResult.blockNumber === null) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
const receipt = await web3.eth.getTransactionReceipt(txHash)
|
const receipt = await web3.eth.getTransactionReceipt(txHash)
|
||||||
if (!receipt.status) {
|
if (!receipt.status) {
|
||||||
throw Error('TX status reverted')
|
throw Error('TX status reverted')
|
||||||
}
|
}
|
||||||
const txResult = await web3.eth.getTransaction(txHash)
|
|
||||||
return txResult.blockNumber !== null
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
let interval = setInterval(async () => {
|
let interval = setInterval(async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user