Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
value: async (messageObject: Object = {}) => {
/*
* Validate the trasaction's object input
*/
userInputValidator({
firstArgument: messageObject,
requiredOr: REQUIRED_PROPS.SIGN_MESSAGE,
});
return signMessage({
derivationPath: await this.derivationPath,
message: messageObject.message,
messageData: messageObject.messageData,
});
},
},
value: async (messageObject: Object = {}) => {
/*
* Validate the trasaction's object input
*/
userInputValidator({
firstArgument: messageObject,
requiredOr: REQUIRED_PROPS.SIGN_MESSAGE,
});
return signMessage({
derivationPath: await this.derivationPath,
message: messageObject.message,
messageData: messageObject.messageData,
});
},
},
value: async (messageObject: Object = {}) => {
/*
* Validate the trasaction's object input
*/
userInputValidator({
firstArgument: messageObject,
requiredOr: REQUIRED_PROPS.SIGN_MESSAGE,
});
return signMessage({
currentAddress: this.address,
message: messageObject.message,
messageData: messageObject.messageData,
});
},
},
value: async (messageObject: Object = {}) => {
/*
* Validate the trasaction's object input
*/
userInputValidator({
firstArgument: messageObject,
requiredOr: REQUIRED_PROPS.SIGN_MESSAGE,
});
return signMessage({
message: messageObject.message,
messageData: messageObject.messageData,
/*
* @NOTE We need to bind the whole ethers instance
*
* Since the `signMessage` will look for different methods inside the
* class's prototype, and if it fails to find them, it will
* crash
*/
callback: (ethersSignMessage: any).bind(ethersInstance),
});
},
},