@toruslabs/ethereum-controllers 4.8.0 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2148,7 +2148,7 @@ class KeyringController extends base_controllers_namespaceObject.BaseKeyringCont
2148
2148
  }
2149
2149
 
2150
2150
  // For eth_sign, we need to sign arbitrary data:
2151
- signMessage(data, address) {
2151
+ async signMessage(data, address) {
2152
2152
  const wallet = this._getWalletForAccount(address);
2153
2153
  const privKey = this.getBufferPrivateKey(wallet.privateKey);
2154
2154
  const messageSig = (0,util_namespaceObject.ecsign)(Buffer.from((0,util_namespaceObject.stripHexPrefix)(data), "hex"), privKey);
@@ -2685,7 +2685,7 @@ class MessageController extends AbstractMessageController {
2685
2685
  try {
2686
2686
  const msgObject = this.getMessage(messageId);
2687
2687
  const cleanMsgParams = await this.approveMessage(messageId, msgObject.messageParams);
2688
- const rawSig = this.signMessage(cleanMsgParams.data, cleanMsgParams.from);
2688
+ const rawSig = await this.signMessage(cleanMsgParams.data, cleanMsgParams.from);
2689
2689
  this.updateMessage(objectSpread2_default()(objectSpread2_default()({}, msgObject), {}, {
2690
2690
  rawSig
2691
2691
  }));