-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
willscott
commented
Oct 20, 2018
- Adds some more comments
- Gets us ready to address the interface in Store confidential contract long term public key in KeyManager database #27
There was a problem hiding this 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/keymanager.js
Outdated
this._web3 = web3; | ||
} | ||
class KeyManager { | ||
constructor(web3, useStorage) { |
There was a problem hiding this comment.
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/keymanager.js
Outdated
if (this._db[address].shorterm) { | ||
return callback(this._db[address].shorterm); | ||
/** | ||
* Get the lcoal keypair for the client. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Get the lcoal keypair for the client. | |
* Get the local keypair for the client. |
was able to get through the rest of this, and cleaned up some of the code a bit more on the way. |
There was a problem hiding this 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.