Fix signalling tx not found on network error
This commit is contained in:
parent
e62068c65a
commit
f138444eee
|
@ -191,6 +191,7 @@ export const useTxData = (
|
|||
}
|
||||
|
||||
const readTxData = async () => {
|
||||
try {
|
||||
const [_response, _receipt] = await Promise.all([
|
||||
provider.getTransaction(txhash),
|
||||
provider.getTransactionReceipt(txhash),
|
||||
|
@ -246,7 +247,10 @@ export const useTxData = (
|
|||
};
|
||||
} catch (err) {
|
||||
tokenMetas[t.token] = null;
|
||||
console.warn(`Couldn't get token ${t.token} metadata; ignoring`, err);
|
||||
console.warn(
|
||||
`Couldn't get token ${t.token} metadata; ignoring`,
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,7 +286,12 @@ export const useTxData = (
|
|||
logs: _receipt.logs,
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
setTxData(null);
|
||||
}
|
||||
};
|
||||
|
||||
readTxData();
|
||||
}, [provider, txhash]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue