fix: effective amount is higher that raw amount in transfer

This commit is contained in:
Sebastian 2023-01-20 09:59:20 -03:00
parent 346056ca91
commit 81dda3b6b1
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -1285,7 +1285,7 @@ export function InvoiceDetails({ amount }: { amount: AmountWithFee }): VNode {
export function TransferDetails({ amount }: { amount: AmountWithFee }): VNode {
const { i18n } = useTranslationContext();
const fee = Amounts.sub(amount.raw, amount.effective).amount;
const fee = Amounts.sub(amount.effective, amount.raw).amount;
const maxFrac = [amount.raw, amount.effective, fee]
.map((a) => Amounts.maxFractionalDigits(a))