Skip to content

Commit

Permalink
chore: update tonconnect package
Browse files Browse the repository at this point in the history
  • Loading branch information
thechefpenguin committed Feb 28, 2025
1 parent f711e76 commit a12e550
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 419 deletions.
2 changes: 1 addition & 1 deletion apps/ton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@ton-community/assets-sdk": "^0.0.5",
"@ton/core": "^0.59.0",
"@ton/ton": "^15.1.0",
"@tonconnect/ui-react": "^2.0.9",
"@tonconnect/ui-react": "^2.0.11",
"@vanilla-extract/next-plugin": "^2.3.0",
"@vanilla-extract/vite-plugin": "catalog:",
"bignumber.js": "^9.1.2",
Expand Down
6 changes: 5 additions & 1 deletion apps/ton/src/ton/logic/liquidity/useAddLiquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { setTransactionModalAtom } from 'atoms/modals/transactionModalAtom'
import { ActionType } from 'components/Modals/ActionModal'
import { useUserAddress } from 'hooks/useUserAddress'
import { useAtomValue, useSetAtom } from 'jotai'
import { useRouter } from 'next/router'
import { useCallback } from 'react'
import { routerContractAtom } from 'ton/atom/contracts/routerContractAtom'

Expand All @@ -30,6 +31,7 @@ interface AddLiquidityArgs {
const GAS = toNano('0.6')

export const useAddLiquidity = () => {
const router = useRouter()
const [tonUI] = useTonConnectUI()

const userAddress = useUserAddress()
Expand Down Expand Up @@ -152,6 +154,8 @@ export const useAddLiquidity = () => {
amount1: formattedAmount1,
hash,
})

router.push('/liquidity')
}
} catch (e) {
console.error(e)
Expand All @@ -160,7 +164,7 @@ export const useAddLiquidity = () => {
resetAppModal()
}
},
[tonUI, userAddress, routerAddress, setTxnModal, resetAppModal],
[tonUI, userAddress, routerAddress, setTxnModal, resetAppModal, router],
)

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export const CardContent = (props: CardContentProps) => {
poolDataQueryAtom({ token0Address: currency0?.wrapped.address, token1Address: currency1?.wrapped.address }),
)

// TODO: Handle native token
const { data: lpBalance, isLoading: isLpBalanceLoading } = useAtomValue(
lpBalanceQueryAtom({
token0Address: currency0?.wrapped.address,
Expand Down
Loading

0 comments on commit a12e550

Please sign in to comment.