mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 02:21:35 +00:00
Fix(frontend): sats sent/receive for swaps is corrected (#1241)
Fixes #1201
This commit is contained in:
parent
013ba8784e
commit
5f7e26b052
@ -16,7 +16,7 @@ const computeSats = ({
|
|||||||
}: computeSatsProps): string | undefined => {
|
}: computeSatsProps): string | undefined => {
|
||||||
const 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