From 01909cdf4301b622fca215bcfb9f8a52aa702c37 Mon Sep 17 00:00:00 2001
From: uncoolzero <107518216+uncoolzero@users.noreply.github.com>
Date: Wed, 22 May 2024 23:17:12 -0300
Subject: [PATCH] temp fixes
---
.../ui/src/components/Silo/Actions/Withdraw.tsx | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/projects/ui/src/components/Silo/Actions/Withdraw.tsx b/projects/ui/src/components/Silo/Actions/Withdraw.tsx
index 2fc8a396c1..f9345a1d4d 100644
--- a/projects/ui/src/components/Silo/Actions/Withdraw.tsx
+++ b/projects/ui/src/components/Silo/Actions/Withdraw.tsx
@@ -39,7 +39,7 @@ import TxnAccordion from '~/components/Common/TxnAccordion';
import useAccount from '~/hooks/ledger/useAccount';
import AdditionalTxnsAccordion from '~/components/Common/Form/FormTxn/AdditionalTxnsAccordion';
import useFarmerFormTxnsActions from '~/hooks/farmer/form-txn/useFarmerFormTxnActions';
-import AddPlantTxnToggle from '~/components/Common/Form/FormTxn/AddPlantTxnToggle';
+// import AddPlantTxnToggle from '~/components/Common/Form/FormTxn/AddPlantTxnToggle';
import FormTxnProvider from '~/components/Common/Form/FormTxnProvider';
import useFormTxnContext from '~/hooks/sdk/useFormTxnContext';
import { FormTxn, PlantAndDoX, WithdrawFarmStep } from '~/lib/Txn';
@@ -176,7 +176,8 @@ const WithdrawForm: FC<
const amount = sdk.tokens.BEAN.amount(
values.tokens[0]?.amount?.toString() || '0'
);
- const crates = siloBalance?.deposits || [];
+ // FIXME: Restore geminating deposits
+ const crates = siloBalance?.convertibleDeposits || [];
if (!isUsingPlant && (amount.lte(0) || !crates.length)) return null;
if (isUsingPlant && plantAndDoX?.getAmount().lte(0)) return null;
@@ -195,7 +196,7 @@ const WithdrawForm: FC<
plantAndDoX,
sdk.silo.siloWithdraw,
season,
- siloBalance?.deposits,
+ siloBalance?.convertibleDeposits,
values.tokens,
whitelistedToken,
]);
@@ -279,7 +280,9 @@ const WithdrawForm: FC<
/>
>
+ {/*
+ */}
{isReady ? (
@@ -430,7 +433,7 @@ const WithdrawPropProvider: FC<{
try {
middleware.before();
if (!account) throw new Error('Missing signer');
- if (!siloBalance?.deposits) {
+ if (!siloBalance?.convertibleDeposits) {
throw new Error('No balances found');
}
@@ -467,7 +470,8 @@ const WithdrawPropProvider: FC<{
}
const withdrawTxn = new WithdrawFarmStep(sdk, token, [
- ...siloBalance.deposits,
+ // FIXME: Restore geminating deposits
+ ...siloBalance.convertibleDeposits,
]);
withdrawTxn.build(
@@ -536,7 +540,7 @@ const WithdrawPropProvider: FC<{
middleware,
txnBundler,
plantAndDoX,
- siloBalance?.deposits,
+ siloBalance?.convertibleDeposits,
refetch,
refetchSilo,
]