app/scripts/metamask-controller.js
// Prefixed Style Message Signing Methods:
Prefixed Style Message Signing Methods.
Prefixed Style Message Signing Methods .
approvePersonalMessage (msgParams, cb) {
    let msgId = this.personalMessageManager.addUnapprovedMessage(msgParams)
    this.sendUpdate()
    this.opts.showUnconfirmedMessage()
    this.personalMessageManager.once(`${msgId}:finished`, (data) => {
      switch (data.status) {
        case 'signed':
          return cb(null, data.rawSig)
        case 'rejected':
          return cb(new Error('MetaMask Message Signature: User denied transaction signature.'))
        default:
          return cb(new Error(`MetaMask Message Signature: Unknown problem: ${JSON.stringify(msgParams)}`))
      }
    })
  }
approvePersonalMessage ( msgParams , cb ) { let msgId = this . personalMessageManager . addUnapprovedMessage ( msgParams ) this . sendUpdate ( ) this . opts . showUnconfirmedMessage ( ) this . personalMessageManager . once ( ` ${ msgId } ` , ( data ) => { switch ( data . status ) { case 'signed' : return cb ( null , data . rawSig ) case 'rejected' : return cb ( new Error ( 'MetaMask Message Signature: User denied transaction signature.' ) ) default : return cb ( new Error ( ` ${ JSON . stringify ( msgParams ) } ` ) ) } } ) }
Prefixed Style Message Signing Methods:
Prefixed Style Message Signing Methods :