Skip to content

Commit

Permalink
fix: log error when we try to transfer *more* than we have fetched (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kylezs authored and dandanlen committed Sep 6, 2023
1 parent a8a550d commit 436caa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion state-chain/pallets/cf-ingress-egress/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub mod pallet {
}

pub fn register_transfer(&mut self, amount: TargetChainAmount<T, I>) {
if amount < self.fetched {
if amount > self.fetched {
log::error!("Transfer amount is greater than available funds");
}
self.fetched.saturating_reduce(amount);
Expand Down

0 comments on commit 436caa6

Please sign in to comment.