wallet_defined_by_keys.js
function approveWallet(wallet, xPubKey, account, arrWalletDefinitionTemplate, arrOtherCosigners, onDone){
	var arrDeviceAddresses = getDeviceAddresses(arrWalletDefinitionTemplate);
	device.addIndirectCorrespondents(arrOtherCosigners, function(){
		addWallet(wallet, xPubKey, account, arrWalletDefinitionTemplate, function(){
			arrDeviceAddresses.forEach(function(device_address){
				if (device_address !== device.getMyDeviceAddress())
					sendMyXPubKey(device_address, wallet, xPubKey);
			});
			if (onDone)
				onDone();
		});
	});
}
function approveWallet(wallet, xPubKey, account, arrWalletDefinitionTemplate, arrOtherCosigners, onDone){
	var arrDeviceAddresses = getDeviceAddresses(arrWalletDefinitionTemplate);
	device.addIndirectCorrespondents(arrOtherCosigners, function(){
		addWallet(wallet, xPubKey, account, arrWalletDefinitionTemplate, function(){
			arrDeviceAddresses.forEach(function(device_address){
				if (device_address !== device.getMyDeviceAddress())
					sendMyXPubKey(device_address, wallet, xPubKey);
			});
			if (onDone)
				onDone();
		});
	});
}
function approveWallet ( wallet , xPubKey , account , arrWalletDefinitionTemplate , arrOtherCosigners , onDone ) { var arrDeviceAddresses = getDeviceAddresses ( arrWalletDefinitionTemplate ) ; device . addIndirectCorrespondents ( arrOtherCosigners , function ( ) { addWallet ( wallet , xPubKey , account , arrWalletDefinitionTemplate , function ( ) { arrDeviceAddresses . forEach ( function ( device_address ) { if ( device_address !== device . getMyDeviceAddress ( ) ) sendMyXPubKey ( device_address , wallet , xPubKey ) ; } ) ; if ( onDone ) onDone ( ) ; } ) ; } ) ; }
called from UI after user confirms creation of wallet initiated by another device
called from UI after user confirms creation of wallet initiated by another device