Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a potentially localStorage backed database #48

Merged
merged 4 commits into from
Oct 22, 2018

Conversation

willscott
Copy link
Contributor

Copy link
Contributor

@armaniferrante armaniferrante left a comment

Choose a reason for hiding this comment

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

Let's run these changes with npm run test:gateway before merging in.

web3c/confidentialprovider.js Show resolved Hide resolved
this._web3 = web3;
}
class KeyManager {
constructor(web3, useStorage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional, but I think it'd be cleaner to inject the db (like an interface) into the constructor instead of passing in a boolean and then dispatching based on type.

web3c/confidentialprovider.js Show resolved Hide resolved
if (this._db[address].shorterm) {
return callback(this._db[address].shorterm);
/**
* Get the lcoal keypair for the client.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Get the lcoal keypair for the client.
* Get the local keypair for the client.

web3c/keymanager.js Show resolved Hide resolved
@willscott
Copy link
Contributor Author

was able to get through the rest of this, and cleaned up some of the code a bit more on the way.

Copy link
Contributor

@armaniferrante armaniferrante left a comment

Choose a reason for hiding this comment

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

Approving conditioned upon npm run test:gateway passing and the explicit updates to optional types.

web3c/confidential.js Outdated Show resolved Hide resolved
web3c/confidentialprovider.js Show resolved Hide resolved
web3c/keymanager.js Show resolved Hide resolved
@willscott willscott merged commit d4abfe3 into master Oct 22, 2018
@willscott willscott deleted the willscott/feature/storage branch October 22, 2018 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants