mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Fix expand amount details on non swap orders
This commit is contained in:
parent
9c982c998f
commit
ba072652a7
@ -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 ? (
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user