@@ -61,17 +61,17 @@ library ERC20DataLibrary {
6161 }
6262
6363 address protocolRecipient = feeInfo.protocolRecipient ();
64- (uint256 protocolFee , uint256 partnerFee ) = feeInfo.computeFee (fee);
64+ (uint256 protocolFeeAmount , uint256 partnerFeeAmount ) = feeInfo.computeFees (fee);
6565
6666 if (feeInfo.feeMode ()) {
6767 token.safeTransferFrom (mainAddress, protocolRecipient, fee);
6868 } else {
69- token.safeTransferFrom (mainAddress, protocolRecipient, protocolFee );
70- token.safeTransferFrom (mainAddress, partnerRecipient, partnerFee );
69+ token.safeTransferFrom (mainAddress, protocolRecipient, protocolFeeAmount );
70+ token.safeTransferFrom (mainAddress, partnerRecipient, partnerFeeAmount );
7171 }
7272
73- emit IKSSmartIntentRouter.CollectFeeBeforeExecution (
74- token, protocolRecipient, partnerRecipient, amount, protocolFee, partnerFee
73+ emit IKSSmartIntentRouter.RecordVolumeAndFees (
74+ token, protocolRecipient, partnerRecipient, true , amount, protocolFeeAmount, partnerFeeAmount
7575 );
7676 }
7777
@@ -83,17 +83,17 @@ library ERC20DataLibrary {
8383 address partnerRecipient
8484 ) internal {
8585 address protocolRecipient = feeInfo.protocolRecipient ();
86- (uint256 protocolFee , uint256 partnerFee ) = feeInfo.computeFee (fee);
86+ (uint256 protocolFeeAmount , uint256 partnerFeeAmount ) = feeInfo.computeFees (fee);
8787
8888 if (feeInfo.feeMode ()) {
8989 token.safeTransfer (protocolRecipient, fee);
9090 } else {
91- token.safeTransfer (protocolRecipient, protocolFee );
92- token.safeTransfer (partnerRecipient, partnerFee );
91+ token.safeTransfer (protocolRecipient, protocolFeeAmount );
92+ token.safeTransfer (partnerRecipient, partnerFeeAmount );
9393 }
9494
95- emit IKSSmartIntentRouter.CollectFeeAfterExecution (
96- token, protocolRecipient, partnerRecipient, amount, protocolFee, partnerFee
95+ emit IKSSmartIntentRouter.RecordVolumeAndFees (
96+ token, protocolRecipient, partnerRecipient, false , amount, protocolFeeAmount, partnerFeeAmount
9797 );
9898 }
9999
0 commit comments