* Fix #6540
- just skip the checkRequest call if result of postTransaction is a tx ID

* Fix requestId naming
This commit is contained in:
Travis Jacobs 2017-09-21 10:10:09 +02:00 committed by Gav Wood
parent 65ca9afce2
commit 9e0d2c15cd

View File

@ -134,8 +134,10 @@ export default class Contract {
return this._api.parity return this._api.parity
.postTransaction(encodedOptions) .postTransaction(encodedOptions)
.then((requestId) => { .then((requestId) => {
statecb(null, { state: 'checkRequest', requestId }); if (requestId.length !== 66) {
return this._pollCheckRequest(requestId); statecb(null, { state: 'checkRequest', requestId });
return this._pollCheckRequest(requestId);
} else { return requestId; }
}) })
.then((txhash) => { .then((txhash) => {
statecb(null, { state: 'getTransactionReceipt', txhash }); statecb(null, { state: 'getTransactionReceipt', txhash });