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

Pending balance in the "wallet" event #464

Open
aboyobam opened this issue Nov 24, 2023 · 0 comments
Open

Pending balance in the "wallet" event #464

aboyobam opened this issue Nov 24, 2023 · 0 comments

Comments

@aboyobam
Copy link

Problem

There is no option to get an accounts pending balance.

Suggested solution

Emit a pending flag with the "wallet" event.
Example:

user.on("wallet", (hasWallet: boolean, currency: SteamUser.ECurrencyCode, balance: number, pending: boolean) => {
    ...
});

Additionally there could be pending: number on the SteamUser.wallet like

const user = new SteamUser();
// login and stuff
user.once("wallet", () => {
   const total = user.wallet.balance + user.wallet.pending;
});

Other Ideas

Because the pending balance and normal balance never change with a single transaction, it would also be an option to add a new event for "pendingWallet" which gets emmited once the pending balance changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant