From 9e0d2c15cd2c1ebf407d0ec8e32d739999322d7f Mon Sep 17 00:00:00 2001 From: Travis Jacobs Date: Thu, 21 Sep 2017 10:10:09 +0200 Subject: [PATCH] Fix #6540 (#6556) * Fix #6540 - just skip the checkRequest call if result of postTransaction is a tx ID * Fix requestId naming --- js/src/api/contract/contract.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index dee4d6d77..b16b92ae6 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -134,8 +134,10 @@ export default class Contract { return this._api.parity .postTransaction(encodedOptions) .then((requestId) => { - statecb(null, { state: 'checkRequest', requestId }); - return this._pollCheckRequest(requestId); + if (requestId.length !== 66) { + statecb(null, { state: 'checkRequest', requestId }); + return this._pollCheckRequest(requestId); + } else { return requestId; } }) .then((txhash) => { statecb(null, { state: 'getTransactionReceipt', txhash });