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

No coins refunded after edit or delete #203

Open
pivilartisant opened this issue Dec 27, 2024 · 4 comments · Fixed by #205
Open

No coins refunded after edit or delete #203

pivilartisant opened this issue Dec 27, 2024 · 4 comments · Fixed by #205
Assignees
Labels
enhancement New feature or request p1

Comments

@pivilartisant
Copy link
Collaborator

Before launching, we need to integrate on cli and frontend the coins refund implementing the withdraw function from the SC.

This should be pretty straight forward for the delete, but what about the edit ? technically since users are delete from storage, they should get refunded or should they request to be refunded ? How can we optimize this in the edit flow so users do not pay for what is already payed for ?

@SlnPons SlnPons added enhancement New feature or request p1 labels Jan 2, 2025
@damip
Copy link
Member

damip commented Jan 2, 2025

All of this could either be automated in the SC (the smart contract itself refunds the caller with any excess coins when updating or deleting) or in the frontend (after an update/delete operation, the front-end looks into the balance of the SC and proposes withdrawing if anything is left there) but that would be a bit heavier for the user

@pivilartisant
Copy link
Collaborator Author

cc

All of this could either be automated in the SC (the smart contract itself refunds the caller with any excess coins when updating or deleting) or in the frontend (after an update/delete operation, the front-end looks into the balance of the SC and proposes withdrawing if anything is left there) but that would be a bit heavier for the user

cc @SlnPons indeed solution two would add an extra operation to sign for the user (in both cli and frontend)

@SlnPons
Copy link
Collaborator

SlnPons commented Jan 2, 2025

Thanks guys! So I would go for the option 1: automated directly in the SC. I couldn't think of any use cases where this solution wouldn't fit. If you see any please share :)
The only thing that I would really like to do is: to get the info about how much coin will be refunded (if any). Is it possible?

@pivilartisant
Copy link
Collaborator Author

Needs to be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@damip @pivilartisant @SlnPons and others