Skip to content
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

fix: allow non-owner spending limit benficiaries to transact #1572

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

iamacook
Copy link
Member

What it solves

Resolves #1561

How this PR fixes it

Non-owner spending limit beneficiaries can now create and execute transactions according to their limits.

How to test it

  1. Add a non-owner as a spending limit beneficiary to a Safe.
  2. Switch to the spending limit beneficiary
  3. Observe that it is possible to create and execute transactions spending limit transactions with the associated token.

Screenshots

spending limit beneficiary

@github-actions
Copy link

github-actions bot commented Jan 20, 2023

Branch preview

✅ Deploy successful!

https://spending_limit_beneficiaries--webcore.review-web-core.5afe.dev

@github-actions
Copy link

github-actions bot commented Jan 20, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very solid approach! Scoped to the Send token modal.

@katspaugh katspaugh added this to the 1.5.0 milestone Jan 24, 2023
@francovenica
Copy link
Contributor

Looks good to me

Checked that you can only access the send funds functionality.
Only the token you have set in the spending limits are listed in the token list selection
Only the option to use spending limit (the radiobutton) is selected in the form
I wasn't able to do any other action with the former owner, which is the expected behavior.

Notes:
Some nish functionalities could be considered for this, like the "Send" button that shows in the assets table when you hover the assets row, or the "Send Again" functionality that you can use from the tx details in the tx history, but I'd assume those require a lot of extra validations. So I'm ok leaving those out and just allow the user to use the "New transaction" button as the only way to send funds

@iamacook
Copy link
Member Author

Notes: Some nish functionalities could be considered for this, like the "Send" button that shows in the assets table when you hover the assets row, or the "Send Again" functionality that you can use from the tx details in the tx history, but I'd assume those require a lot of extra validations. So I'm ok leaving those out and just allow the user to use the "New transaction" button as the only way to send funds

Thank you for the recommendations. I will file issues accordingly.

@github-actions
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@iamacook iamacook merged commit 277ec15 into dev Jan 31, 2023
@iamacook iamacook deleted the spending-limit-beneficiaries branch January 31, 2023 08:39
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Spending limits] Non-owners with a spending limit allowance cannot interact with the Safe
3 participants