Skip to content

Commit e2bd034

Browse files
fix harvesting (#135)
1 parent 1f5923d commit e2bd034

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

components/Token2022/HarvestTokensPanel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ const HarvestTokenPanel = ({ mint }: { mint: PublicKey }) => {
8383
connection: connection.current,
8484
wallet: wallet!,
8585
transactionInstructions: [
86-
{
87-
instructionsSet: txBatchesToInstructionSetWithSigners(ixes, []),
86+
...ixes.map((x) => ({
87+
instructionsSet: txBatchesToInstructionSetWithSigners([x], []),
8888
sequenceType: SequenceType.Parallel,
89-
},
89+
})),
9090
],
9191
autoFee: true,
9292
})
@@ -123,7 +123,7 @@ const HarvestTokenPanel = ({ mint }: { mint: PublicKey }) => {
123123
<Button
124124
isLoading={isHarvesting}
125125
onClick={harvestFees}
126-
disabled={accountsToHarvest === null}
126+
disabled={accountsToHarvest === null || !wallet?.publicKey}
127127
>
128128
Start harvesting
129129
</Button>

components/TransactionLoader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const TransactionLoader = () => {
1919
} = useTransactionsStore()
2020
const connection = useLegacyConnectionContext()
2121
const currentlyProcessing = processedTransactions + 1
22+
2223
return isProcessing ? (
2324
<Modal
2425
hideClose={!hasErrors}
@@ -49,7 +50,7 @@ const TransactionLoader = () => {
4950
</div>
5051
<div className="text-xs text-red pb-1">Error</div>
5152
<div className="mb-5 bg-bkg-1 p-3 rounded-md text-xs break-words">
52-
{error}
53+
{`${error}`}
5354
</div>
5455
<div className="flex justify-center">
5556
<Button onClick={() => retryCallback!()}>Retry</Button>

0 commit comments

Comments
 (0)