-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop
claimable
from Balance::claimable_amount_satoshis
fields
In Java/TypeScript, we map enums as a base class and each variant as a class which extends the base. In Java/TypeScript, functions and fields share the same namespace, which means we cannot have functions on an enum which have the same name as any fields in any enum variants. `Balance`'s `claimable_amount_satoshis` method aliases with fields in each variant, and thus ultimately doesn't compile in TypeScript. Because `Balance::claimable_amount_satoshis` has the same name as the fields, it's also a bit confusing, as it doesn't return the field for each variant, but sometimes returns zero if we're not sure we can claim the balance. Instead, we rename the fields in each enum variant to simply `amount_satoshis`, to avoid implying that we can definitely claim the balance.
- Loading branch information
1 parent
685f266
commit 8302203
Showing
2 changed files
with
134 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.