Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

add last failed tx processing #2

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

dzhambulat
Copy link

this fix checks last failed tx when user enters token address

@rstormsf
Copy link
Owner

so the issue was about to resend any failed tx by querying a tx hash

  1. Implement a new route to display input box to enter txhash
  2. verify if txhash is valid and it was sent to multisender contract address
  3. if it is, ask etherscan.io api for the reason of tx failure if it's out of gas, then
  4. parse tx input and move user to /3 screen where he can see all tx data like you do from screen 1 to 3
  5. send a transaction with higher gasLimit then the previous one.

@dzhambulat
Copy link
Author

added page /#/checktx
enter tx hash, and if it failed, user may push btton "Resend transaction", and it redirects to /#/3 and he can process it and change gas in metamask.

}

async _multisend({slice, addPerTx}) {
alert('ffff')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onSubmit(e){
e.preventDefault()

this.tokenStore.setDecimals(0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? why decimals 0 ?

import { inject, observer } from "mobx-react";
import swal from 'sweetalert';
import generateElement from '../generateElement'
import Example from './example.json'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need all of those dependencies?

const defaultAccount = this.web3Store.defaultAccount;
const web3 = this.web3Store.web3;
const status = await window.fetch(`https://${trustApiName}.etherscan.io/api?module=transaction&action=getstatus&txhash=${txHash}`)
.then((res) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't use Promises.
Use await

@dzhambulat
Copy link
Author

I have done fixes for cleaning ( I forget to commit deleting of debug alerts and other fixes before last PR). I reviewed other classes, and I think that tokenStore and gasPriceStore should be refactored, because many methods violates The Single Responsibility Principle and it was hard to me make additional features and fixes.

@rstormsf rstormsf mentioned this pull request Aug 22, 2018
Copy link

@Carbon-Zero Carbon-Zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants