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

Commit 9e0d2c1

Browse files
Travis Jacobsgavofyork
authored andcommitted
Fix #6540 (#6556)
* Fix #6540 - just skip the checkRequest call if result of postTransaction is a tx ID * Fix requestId naming
1 parent 65ca9af commit 9e0d2c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/src/api/contract/contract.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ export default class Contract {
134134
return this._api.parity
135135
.postTransaction(encodedOptions)
136136
.then((requestId) => {
137-
statecb(null, { state: 'checkRequest', requestId });
138-
return this._pollCheckRequest(requestId);
137+
if (requestId.length !== 66) {
138+
statecb(null, { state: 'checkRequest', requestId });
139+
return this._pollCheckRequest(requestId);
140+
} else { return requestId; }
139141
})
140142
.then((txhash) => {
141143
statecb(null, { state: 'getTransactionReceipt', txhash });

0 commit comments

Comments
 (0)