mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 23:27:26 +01:00
FIX: Don't display amount if none is passed
This commit is contained in:
parent
eb97436015
commit
e4996a80a2
1 changed files with 7 additions and 5 deletions
|
@ -15,7 +15,7 @@ const Success = () => {
|
||||||
};
|
};
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
const { dangerouslyGetParent } = useNavigation();
|
const { dangerouslyGetParent } = useNavigation();
|
||||||
const { amount = 0, fee = 0, amountUnit = BitcoinUnit.BTC, invoiceDescription = '', onDonePressed = pop } = useRoute().params;
|
const { amount, fee, amountUnit = BitcoinUnit.BTC, invoiceDescription = '', onDonePressed = pop } = useRoute().params;
|
||||||
const stylesHook = StyleSheet.create({
|
const stylesHook = StyleSheet.create({
|
||||||
root: {
|
root: {
|
||||||
backgroundColor: colors.elevated,
|
backgroundColor: colors.elevated,
|
||||||
|
@ -76,10 +76,12 @@ export const SuccessView = ({ amount, amountUnit, fee, invoiceDescription, shoul
|
||||||
<View style={styles.root}>
|
<View style={styles.root}>
|
||||||
<BlueCard style={styles.amount}>
|
<BlueCard style={styles.amount}>
|
||||||
<View style={styles.view}>
|
<View style={styles.view}>
|
||||||
|
{amount && (
|
||||||
<>
|
<>
|
||||||
<Text style={[styles.amountValue, stylesHook.amountValue]}>{amount}</Text>
|
<Text style={[styles.amountValue, stylesHook.amountValue]}>{amount}</Text>
|
||||||
<Text style={[styles.amountUnit, stylesHook.amountUnit]}>{' ' + amountUnit}</Text>
|
<Text style={[styles.amountUnit, stylesHook.amountUnit]}>{' ' + amountUnit}</Text>
|
||||||
</>
|
</>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
{fee > 0 && (
|
{fee > 0 && (
|
||||||
<Text style={styles.feeText}>
|
<Text style={styles.feeText}>
|
||||||
|
|
Loading…
Add table
Reference in a new issue