Skip to content

Commit

Permalink
fix: fix the pool contribution classification.
Browse files Browse the repository at this point in the history
This commit fixes the pool contribution classification which was failing
due to the account asset deposit withdraw requirement failing.

This requirement failed because of assets that the analyzer has no
certainty at all about.
  • Loading branch information
0xOmarA committed Feb 6, 2025
1 parent 0712efa commit 279c050
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,20 @@ impl ManifestAnalyzerRequirementState
.iter()
.filter_map(|(resource_address, resource)| {
let bounds = resource.bounds();
if bounds.is_zero() {

// There are two cases that we ignore: the first is when
// the bounds inform us that none of the resource is on
// the worktop and the second is when the bounds give us
// completely no information at all about the resource
// meaning that the analyzer can't either tell if they
// are on the worktop or not. This manifests itself with
// a lower bound of zero and an upper bound that's
// unbounded.
let is_zero = bounds.is_zero();
let is_completely_unknown = bounds.lower_bound()
== LowerBound::Inclusive(dec!(0))
&& bounds.upper_bound() == UpperBound::unbounded();
if is_zero || is_completely_unknown {
None
} else {
Some(*resource_address)
Expand Down

0 comments on commit 279c050

Please sign in to comment.