Skip to content

Commit

Permalink
chore: one last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nemo83 committed Oct 14, 2024
1 parent bc216e0 commit d71ad79
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public boolean isZero() {
* @return true if amount for each asset is non negative
*/
public boolean isPositive() {
boolean isCoinPositive = coin.longValue() >= 0;
boolean isCoinPositive = coin.signum() >= 0;
boolean allAssetsPositive = multiAssets == null || multiAssets.isEmpty() ||
multiAssets.stream().allMatch(multiAsset -> multiAsset.getAssets().stream().allMatch(asset -> asset.getValue().signum() >= 0));
return isCoinPositive && allAssetsPositive;
Expand Down

0 comments on commit d71ad79

Please sign in to comment.