Fix expand amount details on non swap orders

This commit is contained in:
Reckless_Satoshi 2023-03-10 15:43:52 -08:00
parent 9c982c998f
commit ba072652a7
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
2 changed files with 8 additions and 6 deletions

View File

@ -286,11 +286,13 @@ const OrderDetails = ({
primary={amountString}
secondary={order.amount ? 'Amount' : 'Amount Range'}
/>
<ListItemIcon>
<IconButton onClick={() => setShowSwapDetails(!showSwapDetails)}>
{showSwapDetails ? <ExpandLess /> : <ExpandMore color='primary' />}
</IconButton>
</ListItemIcon>
{order.currency === 1000 ? (
<ListItemIcon>
<IconButton onClick={() => setShowSwapDetails(!showSwapDetails)}>
{showSwapDetails ? <ExpandLess /> : <ExpandMore color='primary' />}
</IconButton>
</ListItemIcon>
) : null}
</ListItem>
{order.currency === 1000 ? (

View File

@ -14,7 +14,7 @@ const computeSats = ({
routingBudget = 0,
rate = 1,
}: computeSatsProps): string | undefined => {
let rateWithPremium = rate + premium / 100;
const rateWithPremium = rate + premium / 100;
let sats = (amount / rateWithPremium) * 100000000;
sats = sats * (1 + fee) * (1 - routingBudget);
return pn(Math.round(sats));