add types

This commit is contained in:
tjs 2023-02-13 22:31:53 -05:00
parent 52a84a7268
commit d565b1ea46
1 changed files with 7 additions and 1 deletions

View File

@ -103,7 +103,13 @@ export const getTokenInMax = (
}
}
export const useTokenMax = (useMargin = true) => {
interface TokenMaxResults {
amount: Decimal
amountWithBorrow: Decimal
decimals: number
}
export const useTokenMax = (useMargin = true): TokenMaxResults => {
const { mangoAccount } = useMangoAccount()
const { group } = useMangoGroup()
const inputBank = mangoStore((s) => s.swap.inputBank)