Closed ap211unitech closed 3 months ago
[!IMPORTANT]
Review skipped
Review was skipped due to path filters
Files ignored due to path filters (3)
* `apps/hestia/package.json` is excluded by `!**/*.json` * `packages/core/package.json` is excluded by `!**/*.json` * `yarn.lock` is excluded by `!**/*.lock`, `!**/*.lock`You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The recent changes enhance the Form
and ConfirmTransaction
components in the Hestia app by integrating the Polkadex asset selection and handling. This includes improved validation, error handling, and loading state management. Additionally, updates to hooks and constants ensure better balance calculations and error messages. The integration of terms and conditions with a checkbox also improves user interaction and validation.
File Path | Change Summary |
---|---|
apps/hestia/src/components/thea/Form/index.tsx |
Added Polkadex asset selection, integrated useQueryPools , updated loading and validation logic. |
apps/hestia/src/components/thea/confirmTransaction.tsx |
Updated asset handling, error conditions, and transaction display with parseScientific . |
apps/hestia/src/components/ui/ConnectWallet/confirmTransaction.tsx |
Modified imports, added checkbox state management, adjusted disabled state calculation. |
apps/hestia/src/components/ui/ReadyToUse/terms.tsx |
Enhanced Terms component with checkbox and link, updated props and rendering logic. |
apps/hestia/src/hooks/useBridge.ts |
Added parameters for Polkadex handling, updated balance checks, and error messages. |
packages/core/src/constants/index.ts |
Updated NOT_ENOUGH_LIQUIDITY error message in CrossChainError . |
packages/core/src/helpers/fetchOnChainBalance.ts |
Changed balance calculation to subtract frozen from free balance. |
packages/core/src/hooks/useTheaConfig.tsx |
Added refetchInterval property to useTheaConfig hook configuration. |
packages/core/src/providers/user/thea/index.tsx |
Integrated selectedAssetIdPolkadex , added refetchTransferConfig to context provider. |
packages/core/src/validations/index.ts |
Modified bridgeValidations function to include Polkadex-specific parameters and validation checks. |
sequenceDiagram
participant User
participant FormComponent
participant TheaProvider
participant QueryPoolsHook
participant ValidationSchema
participant ConfirmTransactionComponent
User->>FormComponent: Fill form and submit
FormComponent->>TheaProvider: Get selectedAssetIdPolkadex, isDestinationPolkadex
TheaProvider->>QueryPoolsHook: Fetch pools data
QueryPoolsHook-->>FormComponent: Return pools, poolsLoading
FormComponent->>ValidationSchema: Validate form data with pools and Polkadex info
ValidationSchema-->>FormComponent: Return validation result
FormComponent->>ConfirmTransactionComponent: Pass validated data
ConfirmTransactionComponent->>TheaProvider: Get selectedAssetIdPolkadex
ConfirmTransactionComponent->>parseScientific: Parse transaction amount
parseScientific-->>ConfirmTransactionComponent: Return parsed amount
ConfirmTransactionComponent->>User: Display transaction summary
In the code where assets flow, Polkadex now steals the show. With pools and terms, and checks so neat, Our Hestia app is quite the feat. Balances clear, errors refined, A smoother journey you will find. 🌟✨🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Name | Link |
---|---|
Latest commit | 84fa44fe252f45575f979324d7f2832719b71ac0 |
Latest deploy log | https://app.netlify.com/sites/stupendous-valkyrie-505e4a/deploys/6659fbe45c1e0c00089cd4c7 |
Deploy Preview | https://deploy-preview-1312--stupendous-valkyrie-505e4a.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
Lighthouse |
1 paths audited Performance: 24 Accessibility: 75 Best Practices: 92 SEO: 92 PWA: 70 View the detailed breakdown and full score reports |
To edit notification comments on pull requests, go to your Netlify site configuration.
Description -
This PR aims to fix some more bugs mostly related to new Bridge page -
Refetch transfer config if balance for selected asset is changed. Balance could change after occasional refetch (of 12s) or when a transfer happens.
Remove this scroll area rather add a checkbox saying something like
I agree to Terms & Conditions
Autoswap message:
a. Do not make the user enter amount and click on bridge if they do not have enough PDEX in the destination address. Display the error message on the bridge page itself, not the pop-up. b. Show AutoSwap information by default
Remove frozen balance from Free value for PDEX balance. (polkadex-ts)
Check for Destination chain native balance on bridging token
https://github.com/Polkadex-Substrate/Polkadex-Orderbook-Frontend/assets/65214523/fca98683-d857-491b-bdf9-a5278097c14e
https://github.com/Polkadex-Substrate/Polkadex-Orderbook-Frontend/assets/65214523/053daec4-6b98-4c64-aeb3-1d8df1a9b6e7
Checklist