Closed kacpergumieniuk closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
market-frontend | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 29, 2024 7:47am |
The recent changes across multiple components focus on modifying state handling for numeric values, transitioning from number types to string types. This approach enhances the flexibility of user input and ensures consistency in numeric operations by converting strings to numbers only when necessary. Overall, these adjustments improve the robustness and user experience of input handling in the deposit, withdrawal, and position closing functionalities.
Files | Change Summary |
---|---|
components/Market/Deposit/Deposit.tsx |
Updated amount state from number to string, introducing numAmount for numeric calculations, modifying input handling and validation accordingly. |
components/Market/Withdraw/Withdraw.tsx |
Changed amount state from number to string similar to Deposit, ensuring numeric operations use numAmount and updating input handling to maintain string type. |
components/Market/TradingHub/TradingHubPositions/ClosePositionModal.tsx |
Transitioned price and quantity states from numeric to string, with similar adjustments in conversion and input handling as in other components. |
sequenceDiagram
participant User
participant Deposit
participant Withdraw
participant ClosePositionModal
User->>Deposit: Input amount as string
Deposit->>Deposit: Convert to numAmount
Deposit->>Withdraw: Pass numAmount for validation
withdraw->>User: Display withdrawal options
User->>ClosePositionModal: Input price and quantity as strings
ClosePositionModal->>ClosePositionModal: Convert to numPrice and numQuantity
ClosePositionModal->>User: Display closing options
🐇 In fields of numbers, we hop with glee,
Strings now dance, so wild and free!
No more mishaps, just smooth flows,
With each deposit, our joy grows!
Up we leap, with every change,
In the world of code, we rearrange! ✨
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?
129
Fixing inputs in general in withdraw , deposit, and closing position modal.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation