diff --git a/components/swap/BuyTokenInput.tsx b/components/swap/BuyTokenInput.tsx
index 178df008..3445b72c 100644
--- a/components/swap/BuyTokenInput.tsx
+++ b/components/swap/BuyTokenInput.tsx
@@ -66,7 +66,7 @@ const BuyTokenInput = ({
outputBank || group?.banksMapByName.get(OUTPUT_TOKEN_DEFAULT)?.[0]
}
showTokenList={setShowTokenSelect}
- type="output"
+ tokenType="output"
/>
diff --git a/components/swap/ReduceInputTokenInput.tsx b/components/swap/ReduceInputTokenInput.tsx
index ccb9bd21..f25d9e3f 100644
--- a/components/swap/ReduceInputTokenInput.tsx
+++ b/components/swap/ReduceInputTokenInput.tsx
@@ -60,7 +60,7 @@ const ReduceInputTokenInput = ({
inputBank || group?.banksMapByName.get(INPUT_TOKEN_DEFAULT)?.[0] // default to a user position
}
showTokenList={setShowTokenSelect}
- type="reduce-input"
+ tokenType="reduce-input"
/>
diff --git a/components/swap/ReduceOutputTokenInput.tsx b/components/swap/ReduceOutputTokenInput.tsx
index ef649067..098c96df 100644
--- a/components/swap/ReduceOutputTokenInput.tsx
+++ b/components/swap/ReduceOutputTokenInput.tsx
@@ -53,7 +53,7 @@ const ReduceOutputTokenInput = ({
outputBank || group?.banksMapByName.get(OUTPUT_TOKEN_DEFAULT)?.[0]
}
showTokenList={setShowTokenSelect}
- type="reduce-output"
+ tokenType="reduce-output"
/>
diff --git a/components/swap/SellTokenInput.tsx b/components/swap/SellTokenInput.tsx
index 758f8df2..ba50062c 100644
--- a/components/swap/SellTokenInput.tsx
+++ b/components/swap/SellTokenInput.tsx
@@ -60,7 +60,7 @@ const SellTokenInput = ({
inputBank || group?.banksMapByName.get(INPUT_TOKEN_DEFAULT)?.[0]
}
showTokenList={setShowTokenSelect}
- type="input"
+ tokenType="input"
/>
diff --git a/components/swap/SwapForm.tsx b/components/swap/SwapForm.tsx
index c42abebf..73aa3730 100644
--- a/components/swap/SwapForm.tsx
+++ b/components/swap/SwapForm.tsx
@@ -112,7 +112,7 @@ const SwapForm = () => {
}
})
},
- [inputBank, outputBank, set],
+ [inputBank, outputBank],
)
const handleSetMargin = () => {
diff --git a/components/swap/TokenSelect.tsx b/components/swap/TokenSelect.tsx
index d7f7c2e3..0a86d15e 100644
--- a/components/swap/TokenSelect.tsx
+++ b/components/swap/TokenSelect.tsx
@@ -11,29 +11,29 @@ import { useTranslation } from 'react-i18next'
type TokenSelectProps = {
bank: Bank | undefined
showTokenList: Dispatch
>
- type: SwapFormTokenListType
+ tokenType: SwapFormTokenListType
}
-const TokenSelect = ({ bank, showTokenList, type }: TokenSelectProps) => {
+const TokenSelect = ({ bank, showTokenList, tokenType }: TokenSelectProps) => {
const { t } = useTranslation('trade')
const { group } = useMangoGroup()
const { mangoAccount } = useMangoAccount()
const posType = useMemo(() => {
- if (!bank || !mangoAccount || type !== 'reduce-input') return ''
+ if (!bank || !mangoAccount || tokenType !== 'reduce-input') return ''
const uiPos = mangoAccount.getTokenBalanceUi(bank)
if (uiPos > 0) {
return 'long'
} else if (uiPos < 0) {
return 'short'
}
- }, [bank, mangoAccount, type])
+ }, [bank, mangoAccount, tokenType])
if (!group) return null
return bank ? (