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

Fix Secure API hangs #3927

Merged
merged 11 commits into from
Dec 21, 2016
Merged

Fix Secure API hangs #3927

merged 11 commits into from
Dec 21, 2016

Conversation

ngotchac
Copy link
Contributor

Fixes #3811

The Secure API has been partially rewritten, and is using Promise based connection. No unnecessary calls are made, and the right endpoint is used (previously, 8180 was used in Dev).

Small changes to Wepback have been made to reduce script files size. Firefox still has some troubles (freezes) loading the UI when dev tools is open. Seems to be fine otherwise.

@ngotchac ngotchac added A0-pleasereview 🤓 Pull request needs code review. M7-ui labels Dec 20, 2016
@gavofyork gavofyork modified the milestone: 1.5 Tenuity Dec 20, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 66ee764 on ng-ws-fix into ** on master**.


// Try tokens from localstorage, then from hash
this._tokensToTry = [ sysuiToken, nextToken ].filter((t) => t && t.length);
this._tokens = [
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this case - https://github.com/ethcore/parity/issues/3620

(In this case there is a sysuiToken, however we need to try with initial to generate a token. Basically would try nextToken || 'initial' on line 36, i.e. in this case these is a syuiToken, but won't be a nextToken - first would fail, second would succeed)

@jacogr
Copy link
Contributor

jacogr commented Dec 20, 2016

Much cleaner. Would just explicitly cater for the case where the store is cleared, sysuiToken is thus invalid and we never try 'initial' (comment in the code)

@ngotchac
Copy link
Contributor Author

Should be ok now !

@jacogr
Copy link
Contributor

jacogr commented Dec 21, 2016

Great. Just going to give it a run-through with scenarios, but code looks good.

@jacogr jacogr added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 21, 2016
@jacogr
Copy link
Contributor

jacogr commented Dec 21, 2016

Tested with valid, invalid, auth passed, initial, all seems to be on-spec.

@gavofyork gavofyork merged commit aba3872 into master Dec 21, 2016
@ngotchac ngotchac deleted the ng-ws-fix branch December 28, 2016 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants