Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhargavamacha committed Aug 16, 2024
1 parent aed7b0c commit c7b5c42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clients/rwa-token-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist"
],
"scripts": {
"test": "vitest run tests/tracker.test.ts --testTimeout=240000",
"test": "vitest run --testTimeout=240000",
"lint": "eslint . --ext .ts",
"build": "tsc"
},
Expand Down
8 changes: 4 additions & 4 deletions programs/policy_engine/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ pub fn enforce_policy(
}
}
PolicyType::MaxBalance { limit } => {
if enforce_identity_filter(identity, policy.identity_filter).is_ok() {
if amount + balance > limit {
return Err(PolicyEngineErrors::MaxBalanceExceeded.into());
}
if enforce_identity_filter(identity, policy.identity_filter).is_ok()
&& amount + balance > limit
{
return Err(PolicyEngineErrors::MaxBalanceExceeded.into());
}
}
}
Expand Down

0 comments on commit c7b5c42

Please sign in to comment.