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

give contract infinite token allowance #2275

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

mickvandijke
Copy link
Contributor

Instead of approving the data payments contract to spend what is needed, we now let it spend as much as it wants. Obviously, this is a security concern and should not be the final behaviour. We should look into permits or another solution instead.

For now it will severely reduce problems with concurrent wallet transactions and reduce the amount of transactions needed for data payments.

The problem we had with approvals is that concurrent data payments would overwrite each other's approved allowance, resulting in data payment failures.

)
.await
.map_err(|err| PayForQuotesError(Error::from(err), tx_hashes_by_quote.clone()))?;

// TODO: Get rid of approvals altogether, by using permits or whatever..

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
@mickvandijke mickvandijke changed the base branch from main to rc-2024.10.3 October 21, 2024 11:10
@mickvandijke mickvandijke changed the base branch from rc-2024.10.3 to main October 21, 2024 11:10
@b-zee b-zee added this pull request to the merge queue Oct 21, 2024
Merged via the queue into maidsafe:main with commit ffd7cc3 Oct 21, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants