FIX: recover lost testID="refreshTransactions"

This commit is contained in:
Ivan Vershigora 2020-11-22 11:36:28 +03:00
parent 58cd65487f
commit 3ff3ce1906

View file

@ -209,7 +209,18 @@ const WalletTransactions = () => {
};
const renderListHeaderComponent = () => {
const style = { opacity: isLoading ? 0.5 : 1.0 };
const style = {};
if (!isCatalyst) {
// we need this button for testing
style.opacity = 0;
style.height = 1;
style.width = 1;
} else if (isLoading) {
style.opacity = 0.5;
} else {
style.opacity = 1.0;
}
return (
<View style={styles.flex}>
<View style={styles.listHeader}>
@ -233,11 +244,9 @@ const WalletTransactions = () => {
</View>
<View style={[styles.listHeaderTextRow, stylesHook.listHeaderTextRow]}>
<Text style={[styles.listHeaderText, stylesHook.listHeaderText]}>{loc.transactions.list_title}</Text>
{isCatalyst && (
<TouchableOpacity style={style} onPress={refreshTransactions} disabled={isLoading}>
<Icon name="refresh" type="font-awesome" color={colors.feeText} />
</TouchableOpacity>
)}
<TouchableOpacity testID="refreshTransactions" style={style} onPress={refreshTransactions} disabled={isLoading}>
<Icon name="refresh" type="font-awesome" color={colors.feeText} />
</TouchableOpacity>
</View>
</View>
);