wallet/supernode.js
function readSingleAddress(conn, handleAddress){
	readSingleWallet(conn, function(wallet_id){
		conn.query("SELECT address FROM my_addresses WHERE wallet=?", [wallet_id], function(rows){
			if (rows.length === 0)
				throw Error("no addresses");
			if (rows.length > 1)
				throw Error("more than 1 address");
			handleAddress(rows[0].address);
		});
	})
}
function readSingleAddress(conn, handleAddress){
	readSingleWallet(conn, function(wallet_id){
		conn.query("SELECT address FROM my_addresses WHERE wallet=?", [wallet_id], function(rows){
			if (rows.length === 0)
				throw Error("no addresses");
			if (rows.length > 1)
				throw Error("more than 1 address");
			handleAddress(rows[0].address);
		});
	})
}
function readSingleAddress ( conn , handleAddress ) { readSingleWallet ( conn , function ( wallet_id ) { conn . query ( "SELECT address FROM my_addresses WHERE wallet=?" , [ wallet_id ] , function ( rows ) { if ( rows . length === 0 ) throw Error ( "no addresses" ) ; if ( rows . length > 1 ) throw Error ( "more than 1 address" ) ; handleAddress ( rows [ 0 ] . address ) ; } ) ; } ) }
read single address, If amount of addresses is bigger than one, will throw an error
@param {object} conn - database connection
@param {function} handleAddress - callback
read single address If amount of addresses is bigger than one will throw an error