From c0f19acdcd40bfb787c3832d9488ee3bfc4eb8dc Mon Sep 17 00:00:00 2001 From: Iris Date: Mon, 10 Jun 2024 09:44:11 +0200 Subject: [PATCH] ref: update add erc20 addr in add_commission --- src/interface/referral.cairo | 3 ++- src/naming/internal.cairo | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interface/referral.cairo b/src/interface/referral.cairo index 9fe8748..cc96c4c 100644 --- a/src/interface/referral.cairo +++ b/src/interface/referral.cairo @@ -6,6 +6,7 @@ trait IReferral { self: @TContractState, amount: u256, sponsor_addr: ContractAddress, - sponsored_addr: ContractAddress + sponsored_addr: ContractAddress, + erc20_addr: ContractAddress, ); } diff --git a/src/naming/internal.cairo b/src/naming/internal.cairo index ee374a0..573cde2 100644 --- a/src/naming/internal.cairo +++ b/src/naming/internal.cairo @@ -106,7 +106,7 @@ impl InternalImpl of InternalTrait { // add sponsor commission if eligible if sponsor.into() != 0 { IReferralDispatcher { contract_address: self._referral_contract.read() } - .add_commission(discounted_price, sponsor, sponsored_addr: get_caller_address()); + .add_commission(discounted_price, sponsor, sponsored_addr: get_caller_address(), erc20_addr: erc20); } }