fix broken build
This commit is contained in:
parent
b874f9a0c5
commit
a1af7945d1
@ -224,8 +224,13 @@ export function AdminPage({ onLoadNotOk }: Props): VNode {
|
|||||||
return onLoadNotOk(result);
|
return onLoadNotOk(result);
|
||||||
}
|
}
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
const balance = Amounts.parse(data.balance.amount);
|
const balance = Amounts.parseOrThrow(data.balance.amount);
|
||||||
const balanceIsDebit = data.balance.credit_debit_indicator == "debit";
|
const debitThreshold = Amounts.parseOrThrow(result.data.debitThreshold);
|
||||||
|
const balanceIsDebit =
|
||||||
|
result.data.balance.credit_debit_indicator == "debit";
|
||||||
|
const limit = balanceIsDebit
|
||||||
|
? Amounts.sub(debitThreshold, balance).amount
|
||||||
|
: Amounts.add(balance, debitThreshold).amount;
|
||||||
if (!balance) return <Fragment />;
|
if (!balance) return <Fragment />;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@ -250,7 +255,7 @@ export function AdminPage({ onLoadNotOk }: Props): VNode {
|
|||||||
</section>
|
</section>
|
||||||
<PaytoWireTransferForm
|
<PaytoWireTransferForm
|
||||||
focus
|
focus
|
||||||
currency={balance.currency}
|
limit={limit}
|
||||||
onSuccess={() => {
|
onSuccess={() => {
|
||||||
pageStateSetter((prevState: PageStateType) => ({
|
pageStateSetter((prevState: PageStateType) => ({
|
||||||
...prevState,
|
...prevState,
|
||||||
|
Loading…
Reference in New Issue
Block a user