Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Prepared Send #596
base: main
Are you sure you want to change the base?
Prepared Send #596
Changes from 33 commits
39c40bd
7668b25
d9365f3
10a150f
1fa02aa
68caa7c
d26c7b6
e1f5cdb
9b26914
7c75483
7a50e25
0d2925f
e6820b8
6d82e22
f9d18d1
878e9a9
a999c5b
d99e140
ab29654
333741f
f51eabd
6bcb512
fba73c3
a538e45
5dc9e31
781797e
3fbc522
7b2bdd0
ff0778b
09e0af0
92d3b58
67e33e7
0037705
b5514ea
2ef0155
5eb67a6
abdee5d
a26ba5c
fc559a8
9cb7ac7
a19626c
6f4d6e3
f1ccbe9
2fca71a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful is this returned the tolerance?
Option<Amount>
instead of a bool?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then
has_tolerance
could be merged withis_exact
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to use bools instead of checking the state of Options when doing conditional logic, such as how these functions are used. I can add a tolerance function that returns an Option, but I don't see why we shouldn't provide all of these functions in the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of removing the 3 methods, we can keep a default implementation in the trait?
This would avoid the need for wallet DBs to re-implement them (as it's done in
cdk-rexie
now) and generally preserve the simpler caller semantics from before.