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

Make sure, that get_coin_for_transaction returns a coin object with enough balance #1470

Open
2 of 9 tasks
wulfraem opened this issue Dec 2, 2024 · 0 comments
Open
2 of 9 tasks
Assignees
Labels
Rust Related to the core Rust code. Becomes part of the Rust changelog.

Comments

@wulfraem
Copy link
Contributor

wulfraem commented Dec 2, 2024

Description

When the function get_coin_for_transaction retrieves a Coin object, we have to make sure, that this coin has a balance big enough, that we can actually use it.

Motivation

Getting a Coin object with low balance might lead to our transaction failing. Even worse, if we get the same Coint object for every get_coin_for_transaction call, this would lock out the current user from making writing operations to the chain. Also the current implementation is not paging through results, which should be changed.

To-do list

Add more if points are missing

  • use paging when fetching coins
  • add checks for a minimum balance (value TBD)
  • add tests

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • The feature or fix is implemented in Rust and across all bindings whereas possible.
  • The feature or fix has sufficient testing coverage
  • All tests and examples build and run locally as expected
  • Every piece of code has been document according to the documentation guidelines.
  • If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
  • If the feature is not currently documented, a documentation task Issue has been opened to address this.
@wulfraem wulfraem added the Rust Related to the core Rust code. Becomes part of the Rust changelog. label Dec 2, 2024
@UMR1352 UMR1352 changed the title Make sure, that get_coin_for_transaction returns a coin object with enoug balance Make sure, that get_coin_for_transaction returns a coin object with enough balance Dec 2, 2024
@itsyaasir itsyaasir self-assigned this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Related to the core Rust code. Becomes part of the Rust changelog.
Projects
Status: Product Backlog
Development

No branches or pull requests

2 participants