@@ -764,7 +764,7 @@ abstract contract LSP0ERC725AccountCore is
764
764
/**
765
765
* @dev Forwards the call to an extension mapped to a function selector.
766
766
*
767
- * Calls {_getExtensionAndPayableBool } to get the address of the extension mapped to the function selector being
767
+ * Calls {_getExtensionAndFowardValue } to get the address of the extension mapped to the function selector being
768
768
* called on the account. If there is no extension, the `address(0)` will be returned.
769
769
* Forwards the value sent with the call to the extension if the function selector is mapped to a payable extension.
770
770
*
@@ -786,25 +786,24 @@ abstract contract LSP0ERC725AccountCore is
786
786
bytes calldata callData
787
787
) internal virtual override returns (bytes memory ) {
788
788
// If there is a function selector
789
- (address extension , bool isPayable ) = _getExtensionAndPayableBool (
790
- msg .sig
791
- );
789
+ (
790
+ address extension ,
791
+ bool isForwardingValue
792
+ ) = _getExtensionAndFowardValue (msg .sig );
792
793
793
794
// if value is associated with the extension call and extension function selector is not payable, use the universalReceiver
794
- if (msg .value != 0 && ! isPayable )
795
+ if (msg .value != 0 && ! isForwardingValue )
795
796
universalReceiver (_TYPEID_LSP0_VALUE_RECEIVED, callData);
796
797
797
798
// if no extension was found for bytes4(0) return don't revert
798
- if (msg .sig == bytes4 (0 ) && extension == address (0 )) {
799
- return "" ;
800
- }
799
+ if (msg .sig == bytes4 (0 ) && extension == address (0 )) return "" ;
801
800
802
801
// if no extension was found for other function selectors, revert
803
802
if (extension == address (0 ))
804
803
revert NoExtensionFoundForFunctionSelector (msg .sig );
805
804
806
805
(bool success , bytes memory result ) = extension.call {
807
- value: isPayable ? msg .value : 0
806
+ value: isForwardingValue ? msg .value : 0
808
807
}(abi.encodePacked (callData, msg .sender , msg .value ));
809
808
810
809
if (success) {
@@ -824,7 +823,7 @@ abstract contract LSP0ERC725AccountCore is
824
823
* - {_LSP17_EXTENSION_PREFIX} + `<bytes4>` (Check [LSP2-ERC725YJSONSchema] for encoding the data key).
825
824
* - If no extension is stored, returns the address(0).
826
825
*/
827
- function _getExtensionAndPayableBool (
826
+ function _getExtensionAndFowardValue (
828
827
bytes4 functionSelector
829
828
) internal view virtual override returns (address , bool ) {
830
829
// Generate the data key relevant for the functionSelector being called
0 commit comments