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

Commit 31cb5be

Browse files
author
Travis Jacobs
committed
Fix #6540
- just skip the checkRequest call if result of postTransaction is a tx ID
1 parent 99e981a commit 31cb5be

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/src/api/contract/contract.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ export default class Contract {
133133

134134
return this._api.parity
135135
.postTransaction(encodedOptions)
136-
.then((requestId) => {
137-
statecb(null, { state: 'checkRequest', requestId });
138-
return this._pollCheckRequest(requestId);
136+
.then((result) => {
137+
if (result.length !== 66) {
138+
statecb(null, { state: 'checkRequest', result });
139+
return this._pollCheckRequest(result);
140+
} else { return result; }
139141
})
140142
.then((txhash) => {
141143
statecb(null, { state: 'getTransactionReceipt', txhash });

0 commit comments

Comments
 (0)