default borrows to off when withdrawing
This commit is contained in:
parent
eac4adc18f
commit
39a9507756
|
@ -333,11 +333,11 @@ const WithdrawModal: FunctionComponent<WithdrawModalProps> = ({
|
|||
}, [maxButtonTransition])
|
||||
|
||||
// turn on borrow toggle when asset balance is zero
|
||||
useEffect(() => {
|
||||
if (withdrawTokenSymbol && getMaxForSelectedAsset() === 0) {
|
||||
setIncludeBorrow(true)
|
||||
}
|
||||
}, [withdrawTokenSymbol])
|
||||
// useEffect(() => {
|
||||
// if (withdrawTokenSymbol && getMaxForSelectedAsset() === 0) {
|
||||
// setIncludeBorrow(true)
|
||||
// }
|
||||
// }, [withdrawTokenSymbol])
|
||||
|
||||
if (!withdrawTokenSymbol) return null
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ export async function getWalletTokenInfo(
|
|||
) {
|
||||
const splAccounts = await getOwnedTokenAccounts(connection, ownerPublicKey)
|
||||
const account = await connection.getAccountInfo(ownerPublicKey)
|
||||
if (!account) return splAccounts
|
||||
return splAccounts.concat([
|
||||
{
|
||||
publicKey: ownerPublicKey,
|
||||
|
|
Loading…
Reference in New Issue