Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrjs committed Nov 12, 2023
1 parent 4a448e4 commit e575117
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/StakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion components/notifications/TransactionNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const TransactionNotification = ({
: type === 'error'
? 30000
: type === 'info'
? 4000
? 6000
: 10000

const id = setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion hooks/useLeverageMax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit e575117

Please sign in to comment.