commit 70ddfc3e96aa696f540dda9e6f96618cedb68bf1
parent e42a7c6cce2a327a8169fba7143c9d229c3c92b9
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 21 Jul 2021 16:30:37 -0300
missing wire fee amort
Diffstat:
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx b/packages/frontend/src/paths/instance/orders/create/CreatePage.tsx
@@ -37,6 +37,7 @@ import { OrderCreateSchema as schema } from '../../../../schemas/index';
import { rate } from "../../../../utils/amount";
import { InventoryProductForm } from "../../../../components/product/InventoryProductForm";
import { NonInventoryProductFrom } from "../../../../components/product/NonInventoryProductForm";
+import { InputNumber } from "../../../../components/form/InputNumber";
interface Props {
onCreate: (d: MerchantBackend.Orders.PostOrderRequest) => void;
@@ -180,6 +181,7 @@ export function CreatePage({ onCreate, onBack, instanceConfig, instanceInventory
pay_deadline: value.payments.pay_deadline ? { t_ms: Math.floor(value.payments.pay_deadline.getTime() / 1000) * 1000 } : undefined,
wire_transfer_deadline: value.payments.pay_deadline ? { t_ms: Math.floor(value.payments.pay_deadline.getTime() / 1000) * 1000 } : undefined,
refund_deadline: value.payments.refund_deadline ? { t_ms: Math.floor(value.payments.refund_deadline.getTime() / 1000) * 1000 } : undefined,
+ wire_fee_amortization: value.payments.wire_fee_amortization,
max_fee: value.payments.max_fee,
max_wire_fee: value.payments.max_wire_fee,
@@ -252,8 +254,6 @@ export function CreatePage({ onCreate, onBack, instanceConfig, instanceInventory
...v.pricing,
products_price: hasProducts ? totalAsString : undefined,
order_price: hasProducts ? totalAsString : undefined,
- // products_price: Amounts.stringify(totalPrice.amount),
- // order_price: Amounts.stringify(totalPrice.amount),
}
})
})
@@ -261,16 +261,6 @@ export function CreatePage({ onCreate, onBack, instanceConfig, instanceInventory
const discountOrRise = rate(value.pricing?.order_price || `${config.currency}:0`, totalAsString)
- // useEffect(() => {
- // valueHandler(v => {
- // return ({
- // ...v, pricing: {
- // ...v.pricing!
- // }
- // })
- // })
- // }, [value.pricing?.order_price])
-
return <div>
<section class="section is-main-section">
@@ -350,7 +340,7 @@ export function CreatePage({ onCreate, onBack, instanceConfig, instanceInventory
<InputCurrency name="payments.max_fee" label={i18n`Maximum deposit fee`} tooltip={i18n`Maximum deposit fees the merchant is willing to cover for this order. Higher deposit fees must be covered in full by the consumer.`} />
<InputCurrency name="payments.max_wire_fee" label={i18n`Maximum wire fee`} tooltip={i18n`Maximum aggregate wire fees the merchant is willing to cover for this order. Wire fees exceeding this amount are to be covered by the customers.`} />
- <Input name="payments.wire_fee_amortization" label={i18n`Wire fee amortization`} tooltip={i18n`Factor by which wire fees exceeding the above threshold are divided to determine the share of excess wire fees to be paid explicitly by the consumer.`} />
+ <InputNumber name="payments.wire_fee_amortization" label={i18n`Wire fee amortization`} tooltip={i18n`Factor by which wire fees exceeding the above threshold are divided to determine the share of excess wire fees to be paid explicitly by the consumer.`} />
</InputGroup>
<InputGroup name="extra" label={i18n`Additional information`} tooltip={i18n`Custom information to be included in the contract for this order.`}>