Created
June 4, 2018 16:40
-
-
Save transducer/4cf9fa0683628aa404b4529b76c7dc76 to your computer and use it in GitHub Desktop.
Add policy and inform service provider on address of MAM_DATA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Process MAM message for added authorization. | |
* @param message {Object} MAM message of type {@link AUTHORIZED_TYPE}. | |
* @returns {undefined} | |
*/ | |
processAuthorizedMessage(message) { | |
const { serviceProvider } = message.policy; | |
logger.info(`Authorizing service provider ${JSON.stringify(serviceProvider)}`); | |
this.authorizedServiceProviders.add(serviceProvider); | |
this.sendMamData(this.seed, serviceProvider.iotaAddress, serviceProvider.publicKeyTrytes); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment