Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix #6540
Browse files Browse the repository at this point in the history
- just skip the checkRequest call if result of postTransaction is a tx ID
  • Loading branch information
Travis Jacobs committed Sep 19, 2017
1 parent 25b35eb commit d81107e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/src/api/contract/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ export default class Contract {

return this._api.parity
.postTransaction(encodedOptions)
.then((requestId) => {
statecb(null, { state: 'checkRequest', requestId });
return this._pollCheckRequest(requestId);
.then((result) => {
if (result.length !== 66) {
statecb(null, { state: 'checkRequest', result });
return this._pollCheckRequest(result);
} else { return result; }
})
.then((txhash) => {
statecb(null, { state: 'getTransactionReceipt', txhash });
Expand Down

0 comments on commit d81107e

Please sign in to comment.