diff --git a/components/KeyValue.tsx b/components/KeyValue.tsx index 4dd9324e6..ad3c8f411 100644 --- a/components/KeyValue.tsx +++ b/components/KeyValue.tsx @@ -119,7 +119,7 @@ export default class KeyValue extends React.Component { const styles = StyleSheet.create({ key: { paddingRight: 35, - maxWidth: '50%' + maxWidth: '70%' }, value: { flex: 1, @@ -135,7 +135,6 @@ const styles = StyleSheet.create({ justifyContent: 'flex-end' }, rtlValue: { - paddingRight: 10, - maxWidth: '50%' + paddingRight: 10 } }); diff --git a/views/Order.tsx b/views/Order.tsx index 624d18aad..57a318abb 100644 --- a/views/Order.tsx +++ b/views/Order.tsx @@ -331,35 +331,43 @@ export default class OrderView extends React.Component { keyboardShouldPersistTaps="handled" > {lineItems.map((item: any, index: number) => { - const keyValue = - item.quantity > 1 - ? `${item.name} (x${item.quantity})` - : item.name; - const fiatPriced = item.base_price_money.amount > 0; const unitPrice = fiatPriced ? item.base_price_money.amount : item.base_price_money.sats; - let displayValue; + let unitDisplayValue, totalDisplayValue; if (fiatPriced) { - displayValue = UnitsStore.getFormattedAmount( + unitDisplayValue = UnitsStore.getFormattedAmount( unitPrice, 'fiat' ); + totalDisplayValue = UnitsStore.getFormattedAmount( + unitPrice * item.quantity, + 'fiat' + ); } else { - displayValue = UnitsStore.getFormattedAmount( + unitDisplayValue = UnitsStore.getFormattedAmount( unitPrice, 'sats' ); + totalDisplayValue = UnitsStore.getFormattedAmount( + unitPrice * item.quantity, + 'sats' + ); } + const keyValue = + item.quantity > 1 + ? `${item.name} (x${item.quantity} @ ${unitDisplayValue})` + : item.name; + return ( ); })}