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