-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deposit all
doesn't work when the fee rate is updated
#216
Comments
This issue may occur in the current interaction mode. Currently, when the deposit value change, Neuron will check whether the deposit value is bigger than the max deposit value, if so, the deposit value will change to the max deposit value, or else generate a transaction with the current deposit value. When this issue will occur:At first, we enter a bigger value than the max deposit value, it will change to the max deposit value. But if the I propose to add a max button to let the user set deposit all ckb, and when the user selects deposit all, the input will be disabled and the input value set as the max deposit value. @Danie0918 What do you think? |
The main problem we have here is that the maximum deposit value no longer satisfies the current transaction conditions when the suggestedFeeRate changes. For this problem, you proposed point 2 optimization which I think can work, suggesting to optimize the slider component for changing the deposit percentage, where the amount and fee of the input box changes dynamically, and the summed value is the set deposit percentage. The button for the maximum value is not necessary for the current interaction and can be left out. |
Then we will remove the logic that set the deposit to the max deposit value when the user enters over than the max deposit value, if they want to deposit all, they can slide the slider to 100%. |
Yes, the suggestedFeeRate is out of the user's control, when the user chooses to drag to the maximum, the user's expectation is to deposit the maximum amount, so when the suggestedFeeRate changes the maximum entered should change accordingly to ensure that the transaction takes place. |
Cool, I will resolve this issue with these steps:
|
It should work. But IMO it can be resolved simply by fixing the |
Of cause, if the |
The solution comes from nervosnetwork/neuron#2760 and I find it's easy and clear |
They are different problems, nervosnetwork/neuron#2760 fix the problem of when should we generate tx, but here is resolve how to generate tx. |
Correct me if I'm wrong. The problem is introduced by regenerating a transaction with a user-specified amount and a chain-specified fee rate by the following steps:
If step 2 is prohibited, there won't |
Simply to say, the |
Of cause, if the @Danie0918 What do you think? |
IMO, the amount to deposit is confusing if the fee rate is dynamic because the amount is dynamic too, the only value static is the total value to send, including |
On the other hand, it also happens on the send page, if the users select max to send, the max sends ckb will also change every 30s because the |
Personal idea: a checkbox for |
Can you describe the rules and requirements here about suggestedFeeRate? I'm not sure that a fixed rate is consistent with the original design intent here. @yanguoyu In my opinion suggestedFeeRate should be dynamic to help close deals, then using a fixed rate here doesn't meet expectations. |
|
In that case, I'd recommend still using changing the logic here in Nervos DAO and Send to change dynamically when the maximum value is selected. |
So, what should we finally do? @Danie0918 @Keith-CY Add a max button to set max, and keep the dynamic fee when the users select deposit max? |
It's better to adjust the logic of the slider, the current interaction already meets the needs of the maximum value. Dynamically change the amount when the slider reaches the maximum. @Keith-CY |
LGTM |
Screen.Recording.2023-07-07.at.14.35.16.mov
The fee turns into 0 when fee rate is updated
The text was updated successfully, but these errors were encountered: