Closed songwongtp closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
celatone-frontend-staging | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 13, 2024 5:45am |
The recent update introduces new redirect logic for specific application paths, enhancing user navigation. The /address
path now redirects to /accounts
, while the /accounts
path can redirect to either /contracts
or /evm-contracts
. Additionally, improvements to the loading logic for EVM contracts and transactions have been made, alongside an update to the package manager and a refactor of EVM denomination handling. New properties have been added to components for better token amount formatting, and new hooks have been implemented to manage account and transaction redirection based on address validation.
File | Change Summary |
---|---|
CHANGELOG.md, next.config.js | Added redirect logic for /address to /accounts and /accounts to either /contracts or /evm-contracts . Introduced new routing rules for account addresses in next.config.js . |
src/lib/components/token/TokenImageWithAmount.tsx | Added hasTrailingZeros property to TokenImageWithAmountProps , allowing control over trailing zero display in token amounts. |
src/lib/pages/account-details/hooks/index.ts | Re-exported all exports from the useAccountRedirect module for improved modularity. |
src/lib/pages/account-details/hooks/useAccountRedirect.ts | Introduced useAccountRedirect hook for navigation based on blockchain address validation, handling both Bech32 and hexadecimal addresses. |
src/lib/pages/account-details/index.tsx | Added loading state in AccountDetailsBody to display while checking for redirects. |
src/lib/pages/contract-details/index.tsx | Simplified loading state rendering in ContractDetailsBody by removing conditional check for null contracts. |
src/lib/pages/evm-tx-details/components/EvmTxGasReceipt.tsx | Modified parameters in formatTokenWithValue to prevent displaying trailing zeros in gas receipt information. |
src/lib/pages/evm-tx-details/components/EvmTxInfo.tsx | Added hasTrailingZeros prop to TokenImageWithAmount to control trailing zero display. |
src/lib/pages/evm-tx-details/components/EvmTxInfoMobile.tsx | Added hasTrailingZeros prop to TokenImageWithAmount for cleaner amount display. |
src/lib/utils/evm.ts | Modified getEvmToAddress function to set type property to "user_address" unconditionally, removing differentiation based on method type. |
src/lib/utils/formatter/formatTokenWithValue.ts | Added hasTrailingZeros parameter to formatTokenWithValue for flexible token amount formatting. |
src/lib/utils/formatter/token.ts | Added hasTrailingZeros parameter to formatDecimal and formatUTokenWithPrecision functions for improved control over decimal formatting. |
package.json
file, including dependency management, which may indirectly affect the routing and redirect logic introduced in the main PR.🐇 In the garden of code, where changes bloom,
New paths are laid, dispelling the gloom.
Redirects now dance, from address to account,
With tokens displayed, in a cleaner amount.
A hop and a skip, through logic so bright,
User journeys enhanced, in the soft moonlight! 🌙
[!TIP]
OpenAI O1 model for chat
- We have deployed OpenAI's latest O1 model for chat. - OpenAI claims that this model has superior reasoning capabilities than their GPT-4o model. - Please share any feedback with us in the [discussions post](https://discord.com/channels/1134356397673414807/1283929536186155099).
src/lib/pages/tx-details/hooks/useTxRedirect.ts (1)
`3-13`: **LGTM!** The `useTxRedirect` hook is well-structured and follows best practices: - It has a clear and focused responsibility of redirecting to the EVM transaction details page based on the provided `txHash`. - It uses the `useEvmConfig` and `useInternalNavigate` hooks appropriately. - The function is small and readable, with clear variable names and early return statements. - It aligns with the Single Responsibility Principle (SRP). Great job!src/lib/pages/tx-details/index.tsx (3)
`17-17`: **LGTM!** The import statement for the `useTxRedirect` hook is correct. --- `20-22`: **LGTM!** The code segment correctly initializes the `isMobile` and `router` variables. --- Line range hint `24-43`: **LGTM!** The code segment correctly handles the transaction redirect logic using the `useTxRedirect` hook and renders the loading state appropriately based on the redirect check and data fetching status. The changes align with the AI-generated summary and do not introduce any issues.
Summary by CodeRabbit
Release Notes
New Features
/address
and/accounts
paths.useAccountRedirect
, for streamlined navigation based on blockchain addresses.useTxRedirect
, for navigation based on transaction hashes.Improvements
Bug Fixes