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

Freezing Wallet Balance During Unconfirmed Transactions #939

Closed
hamedkhorasani opened this issue Apr 19, 2024 · 6 comments
Closed

Freezing Wallet Balance During Unconfirmed Transactions #939

hamedkhorasani opened this issue Apr 19, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request Stale

Comments

@hamedkhorasani
Copy link

Dear @rez1dent3,
I'm interested in freezing the wallet balance during unconfirmed transactions. Could you guide me on achieving this functionality?

@hamedkhorasani hamedkhorasani added the enhancement New feature or request label Apr 19, 2024
@rez1dent3
Copy link
Member

Hello. If you need a solution out of the box, then you can use the credits functionality for this.
https://bavix.github.io/laravel-wallet/#/credit-limits

Place a lock on your wallet through the AtomicServiceInterface, create an unconfirmed transaction and reduce the credit limit (default is zero).

When you confirm or cancel a transaction, you return the credit limit back.

@hamedkhorasani
Copy link
Author

How can I apply credits during deposit, withdrawal, or transfer?

rez1dent3 added a commit that referenced this issue Apr 20, 2024
@rez1dent3
Copy link
Member

Demo: #940

It will work similarly with all operations. Essentially, a negative credit limit will prevent operations from working (without the force flag).

IMPORTANT! Here you monitor the update of meta and race condition yourself, and not the package, as is the case with the balance.

@rez1dent3
Copy link
Member

rez1dent3 commented Apr 20, 2024

unconfirmed transactions.

I realized that I didn't pay attention to the word "unconfirmed".

Then the answer is similar to this: #937

@hamedkhorasani
Copy link
Author

Thanks a lot

@rez1dent3
Copy link
Member

Were you able to solve your problem? Can the issue be closed?

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants