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

Fix #6540 #6556

Merged
merged 2 commits into from
Sep 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions js/src/api/contract/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we lose the requestId naming? This is is that the holder of the statecb checks the requestId field which does not exist anywhere anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah that's my mistake, one sec I will revise

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revised 9deac99

return this._pollCheckRequest(result);
} else { return result; }
})
.then((txhash) => {
statecb(null, { state: 'getTransactionReceipt', txhash });
Expand Down