From d81107e9e753ffcafcd54163795016fd3b2a47b7 Mon Sep 17 00:00:00 2001 From: Travis Jacobs Date: Tue, 19 Sep 2017 15:33:13 +0200 Subject: [PATCH] Fix #6540 - just skip the checkRequest call if result of postTransaction is a tx ID --- js/src/api/contract/contract.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index dee4d6d777b..bffa19f402d 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -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 });