From e57511728858472b89d7aefb7a295a23a33fbcbe Mon Sep 17 00:00:00 2001 From: tjs Date: Sun, 12 Nov 2023 15:55:49 -0500 Subject: [PATCH] update --- components/StakeForm.tsx | 4 ++++ components/notifications/TransactionNotification.tsx | 2 +- hooks/useLeverageMax.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/StakeForm.tsx b/components/StakeForm.tsx index 2db47c4..20b5481 100644 --- a/components/StakeForm.tsx +++ b/components/StakeForm.tsx @@ -162,6 +162,10 @@ function StakeForm({ token: selectedToken }: StakeFormProps) { )?.id try { // const newAccountNum = getNextAccountNumber(mangoAccounts) + notify({ + title: 'Building transaction. This may take a moment.', + type: 'info', + }) const { signature: tx, slot } = await stakeAndCreate( client, group, diff --git a/components/notifications/TransactionNotification.tsx b/components/notifications/TransactionNotification.tsx index 69c1056..41fca7f 100644 --- a/components/notifications/TransactionNotification.tsx +++ b/components/notifications/TransactionNotification.tsx @@ -176,7 +176,7 @@ const TransactionNotification = ({ : type === 'error' ? 30000 : type === 'info' - ? 4000 + ? 6000 : 10000 const id = setTimeout(() => { diff --git a/hooks/useLeverageMax.ts b/hooks/useLeverageMax.ts index c44bd15..a1d580a 100644 --- a/hooks/useLeverageMax.ts +++ b/hooks/useLeverageMax.ts @@ -29,7 +29,7 @@ export default function useLeverageMax(selectedToken: string) { const y = 1 - conversionRate * stakeInitAssetWeight.toNumber() - const max = floorToDecimal(1 + x / y, 1).toNumber() + const max = floorToDecimal(1 + (x / y) * 0.9, 1).toNumber() return max }, [stakeBank, borrowBank])