// Path: src/com/blochstech/bitcoincardterminal/Model/Communication/TXSourceId.java
// class TXSourceId {
// 	String OutIndex = null; //Len 4 (8 in hex)
// 	String TXHash = null; //Len 32 (64 in hex)
// 	long Satoshi = 0;
// 	boolean Verified;
// 	boolean Unusable; //Card did not accept due to unusual script, error or block not difficult enough. //TODO: Use and handle.
// }
// 
// Path: src/com/blochstech/bitcoincardterminal/Utils/Tags.java
// public class Tags {
// 	//Set this to false when building to Google Play app store.
// 	public static final boolean DEBUG = false;
// 	
// 	public static final String APP_TAG = "BitcoinCardTerminal";
// }


import java.util.ArrayList;
import java.util.Locale;
import android.util.Log;
import com.blochstech.bitcoincardterminal.Model.Communication.TXSourceId;
import com.blochstech.bitcoincardterminal.Utils.Tags;
package com.blochstech.bitcoincardterminal.Model.Communication;




public class TXSourceUtil {
	public static boolean containsSource(ArrayList<TXSourceId> list, String hash){
		try{
			if(hash == null || list == null)
				return false;
			
			for(int i = 0; i < list.size(); i++){
				if(list.get(i).TXHash.toLowerCase(Locale.ENGLISH).equals(hash.toLowerCase(Locale.ENGLISH))
						&& (list.get(i).Verified || list.get(i).Unusable))
					return true;
			}
		}catch(Exception e){
// Path: src/com/blochstech/bitcoincardterminal/Model/Communication/TXSourceId.java
// class TXSourceId {
// 	String OutIndex = null; //Len 4 (8 in hex)
// 	String TXHash = null; //Len 32 (64 in hex)
// 	long Satoshi = 0;
// 	boolean Verified;
// 	boolean Unusable; //Card did not accept due to unusual script, error or block not difficult enough. //TODO: Use and handle.
// }
// 
// Path: src/com/blochstech/bitcoincardterminal/Utils/Tags.java
// public class Tags {
// 	//Set this to false when building to Google Play app store.
// 	public static final boolean DEBUG = false;
// 	
// 	public static final String APP_TAG = "BitcoinCardTerminal";
// }


// Path: src/com/blochstech/bitcoincardterminal/Model/Communication/TXSourceUtil.java
import java.util.ArrayList;
import java.util.Locale;
import android.util.Log;
import com.blochstech.bitcoincardterminal.Model.Communication.TXSourceId;
import com.blochstech.bitcoincardterminal.Utils.Tags;

package com.blochstech.bitcoincardterminal.Model.Communication;




public class TXSourceUtil {
	public static boolean containsSource(ArrayList<TXSourceId> list, String hash){
		try{
			if(hash == null || list == null)
				return false;
			
			for(int i = 0; i < list.size(); i++){
				if(list.get(i).TXHash.toLowerCase(Locale.ENGLISH).equals(hash.toLowerCase(Locale.ENGLISH))
						&& (list.get(i).Verified || list.get(i).Unusable))
					return true;
			}
		}catch(Exception e){
			Log.e(Tags.APP_TAG, "ContainsSource failed: " + e.toString());