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

Commit

Permalink
Add ability to configure Secure API (for #4885) (#4922)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac authored and jacogr committed Mar 22, 2017
1 parent e76c496 commit cf39431
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions js/src/secureApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,26 @@ export default class SecureApi extends Api {
return this._transport.token;
}

/**
* Configure the current API with the given values
* (`signerPort`, `dappsInterface`, `dappsPort`, ...)
*/
configure (configuration) {
const { dappsInterface, dappsPort, signerPort } = configuration;

if (dappsInterface) {
this._dappsInterface = dappsInterface;
}

if (dappsPort) {
this._dappsPort = dappsPort;
}

if (signerPort) {
this._signerPort = signerPort;
}
}

connect () {
if (this._isConnecting) {
return;
Expand Down

0 comments on commit cf39431

Please sign in to comment.