mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 10:31: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}
|
primary={amountString}
|
||||||
secondary={order.amount ? 'Amount' : 'Amount Range'}
|
secondary={order.amount ? 'Amount' : 'Amount Range'}
|
||||||
/>
|
/>
|
||||||
|
{order.currency === 1000 ? (
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<IconButton onClick={() => setShowSwapDetails(!showSwapDetails)}>
|
<IconButton onClick={() => setShowSwapDetails(!showSwapDetails)}>
|
||||||
{showSwapDetails ? <ExpandLess /> : <ExpandMore color='primary' />}
|
{showSwapDetails ? <ExpandLess /> : <ExpandMore color='primary' />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
) : null}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
{order.currency === 1000 ? (
|
{order.currency === 1000 ? (
|
||||||
|
@ -14,7 +14,7 @@ const computeSats = ({
|
|||||||
routingBudget = 0,
|
routingBudget = 0,
|
||||||
rate = 1,
|
rate = 1,
|
||||||
}: computeSatsProps): string | undefined => {
|
}: computeSatsProps): string | undefined => {
|
||||||
let rateWithPremium = rate + premium / 100;
|
const rateWithPremium = rate + premium / 100;
|
||||||
let sats = (amount / rateWithPremium) * 100000000;
|
let sats = (amount / rateWithPremium) * 100000000;
|
||||||
sats = sats * (1 + fee) * (1 - routingBudget);
|
sats = sats * (1 + fee) * (1 - routingBudget);
|
||||||
return pn(Math.round(sats));
|
return pn(Math.round(sats));
|
||||||
|
Loading…
Reference in New Issue
Block a user