Skip to content

Commit

Permalink
Merge pull request #1006 from multiversx/claim-onbehalf-legacy-tokens…
Browse files Browse the repository at this point in the history
…-check

Claim on behalf legacy tokens check
  • Loading branch information
ovidiuolteanu authored Feb 20, 2025
2 parents 9d00699 + 9b3a456 commit 9df990a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/modules/original_owner_helper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pub trait OriginalOwnerHelperModule {
let attributes: T = farm_token_mapper.get_token_attributes(payment.token_nonce);
let payment_original_owner = attributes.get_original_owner();

require!(
!payment_original_owner.is_zero(),
"Cannot claim rewards on behalf of legacy positions"
);

match opt_original_owner {
Some(ref original_owner) => {
require!(
Expand Down

0 comments on commit 9df990a

Please sign in to comment.