app/scripts/popup-core.js
/**
 * Establishes streamed connections to background scripts and a Web3 provider
 *
 * @param {PortDuplexStream} connectionStream PortStream instance establishing a background connection
 * @param {Function} cb Called when controller connection is established
 */
Establishes streamed connections to background scripts and a Web3 provider
@param {PortDuplexStream} connectionStream PortStream instance establishing a background connection
@param {Function} cb Called when controller connection is established
Establishes streamed connections to background scripts and a Web3 provider @param { PortDuplexStream } connectionStream PortStream instance establishing a background connection @param { Function } cb Called when controller connection is established
function connectToAccountManager (connectionStream, cb) {
  try {
    const mx = setupMultiplex(connectionStream)
    setupControllerConnection(mx.createStream('controller'), cb)
  } catch (err) {
     console.error('connectToAccountManager' + err)
  }
}
function connectToAccountManager ( connectionStream , cb ) { try { const mx = setupMultiplex ( connectionStream ) setupControllerConnection ( mx . createStream ( 'controller' ) , cb ) } catch ( err ) { console . error ( 'connectToAccountManager' + err ) } }
Establishes streamed connections to background scripts and a Web3 provider
 @param {PortDuplexStream} connectionStream PortStream instance establishing a background connection
 @param {Function} cb Called when controller connection is established
Establishes streamed connections to background scripts and a Web3 provider @param { PortDuplexStream } connectionStream PortStream instance establishing a background connection @param { Function } cb Called when controller connection is established
// setup communication with background // setup multiplexing // connect features // setupWeb3Connection(mx.createStream('provider'))