app/core/PaymentChannelsClient.js
/**
	 * Method that initializes the connext client for a
	 * specific address, along with all the listeners required
	 */
Method that initializes the connext client for a
specific address, along with all the listeners required
Method that initializes the connext client for a specific address along with all the listeners required
async init(address) {
		const { provider } = Engine.context.NetworkController.state;
		if (SUPPORTED_NETWORKS.indexOf(provider.type) !== -1) {
			initListeners();
			Logger.log('PC::Initialzing payment channels');
			client = new PaymentChannelsClient(address);
			try {
				Logger.log('PC::setConnext', provider);
				await client.setConnext(provider);
				Logger.log('PC::pollConnextState');
				await client.pollConnextState();
				Logger.log('PC::pollAndSwap');
				await client.pollAndSwap();
			} catch (e) {
				client.logCurrentState('PC::init');
				Logger.error(e, 'PC::init');
			}
		}
	}
async init ( address ) { const { provider } = Engine . context . NetworkController . state ; if ( SUPPORTED_NETWORKS . indexOf ( provider . type ) !== - 1 ) { initListeners ( ) ; Logger . log ( 'PC::Initialzing payment channels' ) ; client = new PaymentChannelsClient ( address ) ; try { Logger . log ( 'PC::setConnext' , provider ) ; await client . setConnext ( provider ) ; Logger . log ( 'PC::pollConnextState' ) ; await client . pollConnextState ( ) ; Logger . log ( 'PC::pollAndSwap' ) ; await client . pollAndSwap ( ) ; } catch ( e ) { client . logCurrentState ( 'PC::init' ) ; Logger . error ( e , 'PC::init' ) ; } } }
Method that initializes the connext client for a
 specific address, along with all the listeners required
Method that initializes the connext client for a specific address along with all the listeners required