-
Notifications
You must be signed in to change notification settings - Fork 219
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
refactor!: remove outdated wallet_ffi balance methods #3528
refactor!: remove outdated wallet_ffi balance methods #3528
Conversation
36b3031
to
942020a
Compare
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.
So I see that the various Balance helper's exist but that the only way to get a balance after these methods are removed is via the callbacks. I think there still needs to be an explicit method to request the balance. So please include a wallet_get_balance(...)
method in this PR that returns the current TariBalance.
The title of this breaking PR should have a ! in it to indicate it is a breaking change i.e. refactor!: remove outdated wallet_ffi balance methods
@philipr-za Your last comment with regards to |
41fd05f
to
19e8fa8
Compare
05139ea
to
b57d586
Compare
606cd5b
to
7af25fb
Compare
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.
LGTM
Note: See suggested name changes for future consideration.
@@ -321,6 +337,22 @@ class Wallet { | |||
return result; | |||
} | |||
|
|||
getBalance() { |
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 think this method would be more aptly named getBalanceFromCallback()
to minimize confusion
return this.balance; | ||
} | ||
|
||
pollBalance() { |
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 think this method would be more aptly named getBalanceFromWallet()
to minimize confusion (see related comment)
pollBalance() { | ||
return this.wallet.pollBalance(); |
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 think these methods would be more aptly named getBalanceFromWallet()
to minimize confusion (see related comment)
a50bd5b
7af25fb
to
a50bd5b
Compare
Removed outdated balance methods Updated wallet.h Updated cucumber tests Review comments cargo-fmt
a50bd5b
to
35efa34
Compare
Description
Removed outdated balance methods in wallet_ffi
Updated wallet.h
Updated cucumber tests
Motivation and Context
Removal of outdated methods
Merge #3547 first.
How Has This Been Tested?
nvm use 12.22.6 && node_modules/.bin/cucumber-js --profile "ci" --tags "not @long-running and not @broken and @wallet-ffi"