Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
afe5150
Fix locks
vkulinich-cl Mar 2, 2026
e77fd1d
fix lint
vkulinich-cl Mar 2, 2026
ecec62a
Merge branch 'next' into fix/locks
vkulinich-cl Mar 19, 2026
45592ea
add subsquare api
vkulinich-cl Mar 23, 2026
7251a12
fix locks
vkulinich-cl Mar 23, 2026
575cd1d
wip
vkulinich-cl Mar 23, 2026
40cdca8
adjust maxLockedBlock
vkulinich-cl Mar 25, 2026
af124b1
Merge branch 'master' into fix/locks
vkulinich-cl Mar 25, 2026
40cd374
fix unlocking locks
vkulinich-cl Mar 30, 2026
f952659
address PR comments
vkulinich-cl Mar 30, 2026
9bcce0c
replace indexer url
vkulinich-cl Mar 30, 2026
394c6c0
Triggering pipeline
vkulinich-cl Mar 31, 2026
1519310
updat format units
vkulinich-cl Mar 31, 2026
10c9146
Fix DCA and OTC minor issues
vkulinich-cl Apr 3, 2026
3e4b2cd
improve asset selector modal
vkulinich-cl Apr 3, 2026
1b3b3f5
imrpove asset select modal
vkulinich-cl Apr 3, 2026
8a66eb2
Display compact total values
vkulinich-cl Apr 3, 2026
663ff4c
fox mobile styling issues
vkulinich-cl Apr 3, 2026
d4eb90c
Add loading state to Asset selector on market page
vkulinich-cl Apr 3, 2026
89a9d2d
Merge pull request #3704 from galacticcouncil/chore/3618
vkulinich-cl Apr 7, 2026
9df9bf4
Replace metrics indexer url
vkulinich-cl Apr 7, 2026
e7e88af
Merge pull request #3709 from galacticcouncil/chore/replace-metrics-i…
vkulinich-cl Apr 7, 2026
9ddc6a5
Update RPC list
jvonasek Apr 7, 2026
e538e2e
Upgrade xc-cfg@0.18.2
jvonasek Apr 7, 2026
366652e
Merge pull request #3559 from galacticcouncil/fix/locks
vkulinich-cl Apr 7, 2026
f88a8cd
Merge pull request #3710 from galacticcouncil/chore/rpc-list-update
jvonasek Apr 7, 2026
33bafc1
fix balance loading state
vkulinich-cl Apr 7, 2026
57a6b95
upgrade sdk
vkulinich-cl Apr 8, 2026
256d1ba
Reown WalletConnect
jvonasek Apr 8, 2026
9a1b663
Merge pull request #3679 from galacticcouncil/feat/reown
jvonasek Apr 8, 2026
d88076b
Merge pull request #3703 from galacticcouncil/fix/dca-orders
vkulinich-cl Apr 8, 2026
bd3f8cc
Fix set collateral
vkulinich-cl Apr 8, 2026
732db69
upgrade sdk
vkulinich-cl Apr 8, 2026
da24fe8
Merge pull request #3718 from galacticcouncil/fix/set-collateral
vkulinich-cl Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/main/src/api/balances.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { QUERY_KEY_BLOCK_PREFIX } from "@galacticcouncil/utils"
import { queryOptions } from "@tanstack/react-query"
import Big from "big.js"
import { millisecondsInMinute } from "date-fns/constants"
Expand All @@ -24,7 +23,7 @@ export const nativeTokenLocksQuery = (
address: string,
) => {
return queryOptions({
queryKey: [QUERY_KEY_BLOCK_PREFIX, "balances", "native-lock", address],
queryKey: ["balances", "native-lock", address],
queryFn: async () => {
const locks = await papi.query.Balances.Locks.getValue(address)

Expand Down
29 changes: 18 additions & 11 deletions apps/main/src/api/borrow/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
DEFAULT_NULL_VALUE_ON_TX,
ProtocolAction,
transactionType,
} from "@aave/contract-helpers"
import { Web3Provider } from "@ethersproject/providers"
import { ExtendedFormattedUser } from "@galacticcouncil/money-market/hooks"
Expand Down Expand Up @@ -549,19 +550,25 @@ export const useBorrowDisableCollateralTxs = () => {
(reserve) => reserve.usageAsCollateralEnabledOnUser,
)

const poolInstance = poolContract.getContractInstance(
poolContract.poolAddress,
)

return await Promise.all(
activeCollaterals.map(async (collateral) => {
const collateralTxs = await poolContract.setUsageAsCollateral({
reserve: collateral.underlyingAsset,
usageAsCollateral: false,
user: evmAddress,
})
const txRaw =
await poolInstance.populateTransaction.setUserUseReserveAsCollateral(
collateral.underlyingAsset,
false,
)

const tx = await collateralTxs
.find((tx) => "DLP_ACTION" === tx.txType)
?.tx()
const tx: transactionType = {
...txRaw,
from: evmAddress,
value: DEFAULT_NULL_VALUE_ON_TX,
}

if (!tx || !tx.from || !tx.to || !tx.data || !tx.gasLimit) {
if (!tx || !tx.from || !tx.to || !tx.data) {
throw new Error(
`Disable collateral transaction not found for ${collateral.underlyingAsset}`,
)
Expand All @@ -570,7 +577,7 @@ export const useBorrowDisableCollateralTxs = () => {
const { gasLimit, maxFeePerGas, maxPriorityFeePerGas } =
await estimateGasLimit({
evm,
gasLimit: tx.gasLimit.toString(),
gasLimit: tx.gasLimit?.toString(),
action: ProtocolAction.setUsageAsCollateral,
})

Expand Down Expand Up @@ -623,7 +630,7 @@ export const useSetUsageAsCollateralTx = () => {
await estimateGasLimit({
evm,
gasLimit: tx.gasLimit?.toString(),
action: ProtocolAction.claimRewards,
action: ProtocolAction.setUsageAsCollateral,
})

const evmCall = papi.tx.EVM.call({
Expand Down
Loading
Loading