-
Notifications
You must be signed in to change notification settings - Fork 20
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
Re-enable spend max feature #1660
Comments
Currently, we leverage our multi-fee system to accidentally support maximum sends in certain scenarios. Consider the following cases: Active Functionality:These are constructed using an 1. Sending an alternative asset (GM) while paying fees with the native asset (UM). 2. Sending an alternative asset (Pizza) while paying fees with another alternative asset (GN). Inactive Functionality:These would be constructed using an 3. Sending the maximum amount of the native asset (UM). Proposals:Invariants (3) and (4) fundamentally both rely on the presence of UM. We need to handle these cases by checking the following conditions:
Alternatively, the cc @grod220 @Valentine1898 wondering your thoughts? |
@TalDerei I believe your proposed solution will work But to me the important point is that the planner should reject TPR that contains spend actions in these cases:
I believe that these restrictions should be added specifically to the planner so that client-side mistakes don't create unexpected |
Just to clarify, are you leaning towards checking the aforementioned conditions on the frontend, or do you prefer only supporting max sends for UM? The former is more flexible. |
I think we should support MAX send not only for UM, but for alt_fee tokens as well. |
Agreed. On another note, it's unclear to me how to support max spends for alternative fee tokens, like |
The frontend can query gas prices RPC and get a list of alt fee tokens |
we can't directly query the actions contained in the |
Context
#1612 and #1611 resulted in a feature regression that should be re-enabled and properly implemented. Below is a high-level product plan for achieving this.
Updates required to enable send max
cc @grod220
The text was updated successfully, but these errors were encountered: