diff --git a/apps/bond/components/BondingProducts/Bonding/TokenManagement/hooks/useWsolDeposit.jsx b/apps/bond/components/BondingProducts/Bonding/TokenManagement/hooks/useWsolDeposit.jsx index 82d1e3e0..f0650467 100644 --- a/apps/bond/components/BondingProducts/Bonding/TokenManagement/hooks/useWsolDeposit.jsx +++ b/apps/bond/components/BondingProducts/Bonding/TokenManagement/hooks/useWsolDeposit.jsx @@ -11,9 +11,11 @@ import { import { useWallet } from '@solana/wallet-adapter-react'; import { SystemProgram, Transaction } from '@solana/web3.js'; import Decimal from 'decimal.js'; +import Link from 'next/link'; import { notifyError, notifySuccess } from '@autonolas/frontend-library'; +import { UNICODE_SYMBOLS } from 'libs/util-constants/src/lib/symbols'; import idl from 'libs/util-contracts/src/lib/abiAndAddresses/liquidityLockbox.json'; import { useSvmConnectivity } from 'common-util/hooks/useSvmConnectivity'; @@ -44,6 +46,19 @@ import { import { useGetOrCreateAssociatedTokenAccount } from './useGetOrCreateAssociatedTokenAccount'; import { useWhirlpool } from './useWhirlpool'; +const GetSomeOlas = () => ( + <> + OLAS Associated token account does not exist.  + + Get some OLAS first {UNICODE_SYMBOLS.EXTERNAL_LINK}. + + +); + const getOlasAmount = async (connection, walletPublicKey, tokenAddress) => { const tokenAccounts = await connection.getTokenAccountsByOwner(walletPublicKey, { programId: TOKEN_PROGRAM_ID, @@ -153,7 +168,6 @@ export const useWsolDeposit = () => { } const { whirlpoolTokenA, whirlpoolTokenB } = await getWhirlpoolData(); - console.log({ whirlpoolTokenA, whirlpoolTokenB }); const quote = await getDepositIncreaseLiquidityQuote({ sol, slippage }); const { solMax, olasMax } = await getDepositTransformedQuote(quote); @@ -163,13 +177,13 @@ export const useWsolDeposit = () => { whirlpoolTokenB.mint, svmWalletPublicKey, ); - console.log({ tokenOwnerAccountB }); const accountInfo = await connection.getAccountInfo(tokenOwnerAccountB); - console.log({ accountInfo }); - if (!accountInfo) { - notifyError('OLAS Associated token account does not exist'); + if (accountInfo) { + // If the user has no associated token account, they need to get some OLAS first + // from orca + notifyError(); return null; }