status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
299 stars 79 forks source link

[UI - Wallet Stability] Create new `SQ/StatusAmountInputPanel` for SendModal / BridgeModal / SwapModal #15207

Closed noeliaSD closed 3 months ago

noeliaSD commented 5 months ago

Design

Screenshot 2024-06-17 at 14 50 45

Screenshot 2024-06-17 at 14 50 37

caybro commented 5 months ago

Oh that's a new one! I like it, would definitely be a better replacement for the SwapModal/SwapInputPanel component

caybro commented 4 months ago

Just a reminder, this is also used in SwapModal like this: AmountToSend -> SwapInputPanel -> SwapModal

noeliaSD commented 4 months ago

As decided in our sync, maybe better to create a separate and new component, only apply this new component to send and bridge AND create a separate task to do the integration of the new component to swap for the next milestone.

Khushboo-dev-cpp commented 4 months ago

@micieslak as discussed, this is also something swap needs as we currently use double within the current AmountToSendInput and it causes loss of precision, As I understand from @noeliaSD the work done here will not be used in swap but a different issue will be created for it. Would be great if we can create a task for it so that its not forgotten :)

caybro commented 4 months ago

@micieslak as discussed, this is also something swap needs as we currently use double within the current AmountToSendInput and it causes loss of precision, As I understand from @noeliaSD the work done here will not be used in swap but a different issue will be created for it. Would be great if we can create a task for it so that its not forgotten :)

We don't really use a double here (but the rawValue based on the Big number) in SwapModal

Khushboo-dev-cpp commented 4 months ago

@micieslak as discussed, this is also something swap needs as we currently use double within the current AmountToSendInput and it causes loss of precision, As I understand from @noeliaSD the work done here will not be used in swap but a different issue will be created for it. Would be great if we can create a task for it so that its not forgotten :)

We don't really use a double here (but the rawValue based on the Big number) in SwapModal

https://github.com/status-im/status-desktop/blob/c8744cf3bf53d4fbbc7f65ae1fbe281281bca612/ui/imports/shared/popups/send/views/AmountToSend.qml#L62

caybro commented 4 months ago

@micieslak as discussed, this is also something swap needs as we currently use double within the current AmountToSendInput and it causes loss of precision, As I understand from @noeliaSD the work done here will not be used in swap but a different issue will be created for it. Would be great if we can create a task for it so that its not forgotten :)

We don't really use a double here (but the rawValue based on the Big number) in SwapModal

https://github.com/status-im/status-desktop/blob/c8744cf3bf53d4fbbc7f65ae1fbe281281bca612/ui/imports/shared/popups/send/views/AmountToSend.qml#L62

Yes, but in SwapModal we use the "text" for display, and rawValue when sending the transaction right?

But general yeah, there should be ideally no floats/doubles around in that code

Khushboo-dev-cpp commented 4 months ago

@micieslak as discussed, this is also something swap needs as we currently use double within the current AmountToSendInput and it causes loss of precision, As I understand from @noeliaSD the work done here will not be used in swap but a different issue will be created for it. Would be great if we can create a task for it so that its not forgotten :)

We don't really use a double here (but the rawValue based on the Big number) in SwapModal

https://github.com/status-im/status-desktop/blob/c8744cf3bf53d4fbbc7f65ae1fbe281281bca612/ui/imports/shared/popups/send/views/AmountToSend.qml#L62

Yes, but in SwapModal we use the "text" for display, and rawValue when sending the transaction right?

But general yeah, there should be ideally no floats/doubles around in that code

The thing is that these floats are used to calculate the rawValue in the end and thats whats causing the issue withe losing precision.