Skip to content

Conversation

@midas-myth
Copy link
Contributor

@midas-myth midas-myth commented Aug 6, 2025


@netlify
Copy link

netlify bot commented Aug 6, 2025

Deploy Preview for vigilant-albattani-df38ec ready!

Name Link
🔨 Latest commit 6f6425f
🔍 Latest deploy log https://app.netlify.com/projects/vigilant-albattani-df38ec/deploys/68d66379f323bc0008bc5039
😎 Deploy Preview https://deploy-preview-1810--vigilant-albattani-df38ec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 6, 2025

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: eec0d14
Status: ✅  Deploy successful!
Preview URL: https://cf8e7a23.gmx-interface.pages.dev
Branch Preview URL: https://multichain-lp.gmx-interface.pages.dev

View logs

@midas-myth midas-myth self-assigned this Sep 18, 2025
@midas-myth midas-myth changed the base branch from multichain-layout to release-82 September 18, 2025 21:50
… for ExpressEstimationInsufficientGasPaymentTokenBalanceError. Update BridgeOutModal to remove unused label and modify estimateExpressParams to throw error without message for improved clarity.
…introducing initial wrapped token address handling and updating amount calculations for initial long and short tokens. This improves accuracy in fee estimations for market token deposits and ensures proper handling of wrapped tokens.
@midas-myth midas-myth marked this pull request as ready for review November 26, 2025 17:02
…e UI interactions. Replace deprecated icons with updated SVGs, and implement a dropdown menu for deposit and withdrawal actions, improving user experience and accessibility in the pools details view.
…improve clarity. Update stargateTransferFees to return native fees and gas limits directly, enhancing consistency across fee estimation calculations for various token transfers.
}

export function getOppositeCollateralFromConfig(marketConfig: MarketConfig, tokenAddress: string) {
return marketConfig.shortTokenAddress === tokenAddress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check for getIsEquivalentTokens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on usage, no

}

export function isMarketTokenAddress(chainId: number, marketTokenAddress: string): boolean {
return Boolean(MARKETS[chainId]?.[marketTokenAddress]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's don't use MARKETS directly and it could be in configs file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved

}

export function getMarketIndexTokenSymbol(chainId: number, marketTokenAddress: string): string {
const indexToken = getMarketIndexToken(chainId, marketTokenAddress);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant function, it could be just getIndexToken().symbol

return indexToken.symbol;
}

export function getMarketLongTokenAddress(chainId: number, marketTokenAddress: string): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getTokenAddressByMarket(chain, market, 'long' | 'short' | 'index')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

donw

return MARKETS[chainId][marketTokenAddress].shortTokenAddress;
}

export function getMarketLongToken(chainId: number, marketTokenAddress: string): Token {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getToken(getTokenByMarket())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"build:esm": "tsc -p tsconfig.esm.json && echo '{\"type\": \"module\"}' > build/esm/src/package.json",
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
"build:subsquid": "./node_modules/@graphql-codegen/cli/cjs/bin.js -c subsquid-codegen.ts",
"build:subsquid": "./node_modules/@graphql-codegen/cli/cjs/bin.js -c subsquid-codegen.ts && npx prettier --write src/types/subsquid.ts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


const sourceChainBalancesForSelector: Partial<Record<AnyChainId | 0, bigint>> =
multichainMarketTokenBalances?.balances
? mapValues(
Copy link
Contributor

@divhead divhead Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obect.entries().filter([balanceChainId] => Number(balanceChainId) != chainId).reduce(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

? mapValues(
pickBy(multichainMarketTokenBalances.balances, (data, chainIdStr) => {
const chainIdNum = Number(chainIdStr);
return data && chainIdNum !== chainId && chainIdNum !== 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

balanceChainId
why !== 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to filter out gmx acc, replaced with GMX_ACCOUNT_PSEUDO_CHAIN_ID

return {
token: glvOrMarketAddress as Address,
amount: bridgeOutAmount,
minAmountOut: 0n,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move outside component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return expressTransactionBuilder;
}, [account, bridgeOutChain, bridgeOutParams, chainId]);

const expressTxnParamsAsyncResult = useArbitraryRelayParamsAndPayload({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems not async

Copy link
Contributor Author

@midas-myth midas-myth Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean ?
the type returned is

const expressTxnParamsAsyncResult: AsyncResult<ExpressTxnParams>

]);
}

return getTransferRequests([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move outside of the component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
}, [account, isVisibleOrView, setIsVisibleOrView]);

// TODO move this out of the abstract gmx account modal in container
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment

balance: walletBalance,
balanceUsd: walletBalanceUsd,
},
[0]: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced with GMX_ACCOUNT_PSEUDO_CHAIN_ID

);
});

it.skip("sepolia glv market buy", { timeout: 30_000 }, async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skipped test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unskipped both in that file

…nd efficiency. Remove unused selectors for GLV and market tokens, and streamline logic for updating token inputs based on collateral types. Enhance withdrawal calculations to account for same collateral scenarios, ensuring accurate token amount handling during deposits and withdrawals.
…hain market token balances, improving balance checks for market tokens. Update logic to ensure only tokens with available balances are considered, enhancing accuracy in token option selection.
… state management. Replace dynamic toast ID generation with a constant identifier for better clarity and consistency. Clean up unused state variables and streamline effect dependencies for enhanced performance.
… to enhance multichain support. Update token handling in various components to utilize the new pseudo chain ID, improving balance management and user experience across the application.
…o getTokenSymbolByMarket. Update related components to utilize the new function for improved clarity and maintainability in token symbol handling across the application.
… for insufficient token balances. Update localization files to include new error message format for various languages.
[botanix.id]: http(),
[bsc.id]: http(),
},
transports: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we have a mapping of supported chains -> viem chains to not edit this place when we support new chain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants