Skip to content

Commit

Permalink
Fix readonly wallet receive
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo committed Jan 11, 2024
1 parent e76a14c commit 557b2ef
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions apps/wallet-mobile/src/TxHistory/ActionsBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,36 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {

<View style={styles.centralized}>
<View style={[styles.row, disabled && styles.disabled]}>
<View style={styles.centralized}>
<TouchableOpacity
style={styles.actionIcon}
onPress={navigateTo.receive}
testID="receiveButton"
disabled={disabled}
>
<Icon.Received {...ACTION_PROPS} />
</TouchableOpacity>

<Text style={styles.actionLabel}>{strings.receiveLabel}</Text>
</View>

{!wallet.isReadOnly && <Spacer width={18} />}

{!wallet.isReadOnly && (
<View style={styles.centralized}>
<TouchableOpacity
style={styles.actionIcon}
onPress={navigateTo.receive}
testID="receiveButton"
onPress={handleOnSend}
testID="sendButton"
disabled={disabled}
>
<Icon.Received {...ACTION_PROPS} />
<Icon.Send {...ACTION_PROPS} />
</TouchableOpacity>

<Text style={styles.actionLabel}>{strings.receiveLabel}</Text>
<Text style={styles.actionLabel}>{strings.sendLabel}</Text>
</View>
)}

{!wallet.isReadOnly && <Spacer width={18} />}

<View style={styles.centralized}>
<TouchableOpacity style={styles.actionIcon} onPress={handleOnSend} testID="sendButton" disabled={disabled}>
<Icon.Send {...ACTION_PROPS} />
</TouchableOpacity>

<Text style={styles.actionLabel}>{strings.sendLabel}</Text>
</View>

{!wallet.isReadOnly && (
<>
<Spacer width={18} />
Expand Down

0 comments on commit 557b2ef

Please sign in to comment.