mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
fixed PendingTx resolve
This commit is contained in:
parent
c77c8f0141
commit
fa9b3a794e
@ -153,10 +153,10 @@ export function init(instance: ?Web3, coinIndex: number = 0): AsyncAction {
|
|||||||
const onBlockMined = async (error: ?Error, blockHash: ?string) => {
|
const onBlockMined = async (error: ?Error, blockHash: ?string) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
||||||
// window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
// // try again
|
// try again
|
||||||
// onBlockMined(new Error("manually_triggered_error"), undefined);
|
onBlockMined(new Error("manually_triggered_error"), undefined);
|
||||||
// }, 30000);
|
}, 30000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blockHash) {
|
if (blockHash) {
|
||||||
@ -315,7 +315,7 @@ export const getTransactionReceipt = (tx: PendingTx): AsyncAction => {
|
|||||||
const web3 = web3instance.web3;
|
const web3 = web3instance.web3;
|
||||||
|
|
||||||
//web3.eth.getTransactionReceipt(txid, (error, tx) => {
|
//web3.eth.getTransactionReceipt(txid, (error, tx) => {
|
||||||
web3.eth.getTransaction(tx.id, (error, receipt) => {
|
web3.eth.getTransaction(tx.id, (error: Error, receipt: any) => {
|
||||||
if (receipt && receipt.blockNumber) {
|
if (receipt && receipt.blockNumber) {
|
||||||
web3.eth.getBlock(receipt.blockHash, (error, block) => {
|
web3.eth.getBlock(receipt.blockHash, (error, block) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
Loading…
Reference in New Issue
Block a user