diff --git a/contracts/src/Assets.sol b/contracts/src/Assets.sol index 97ed7b405d..a1ccac2ff5 100644 --- a/contracts/src/Assets.sol +++ b/contracts/src/Assets.sol @@ -65,11 +65,6 @@ library Assets { if ($.assetHubParaID == destinationChain) { costs.foreign = $.assetHubReserveTransferFee; } else { - // Destination fee cannot be zero. MultiAssets are not allowed to be zero in xcm v4. - if (destinationChainFee == 0) { - revert InvalidDestinationFee(); - } - // If the final destination chain is not AssetHub, then the fee needs to additionally // include the cost of executing an XCM on the final destination parachain. costs.foreign = $.assetHubReserveTransferFee + destinationChainFee; @@ -112,6 +107,9 @@ library Assets { revert Unsupported(); } } else { + if (destinationChainFee == 0) { + revert InvalidDestinationFee(); + } // The funds will be minted into sovereign account of the destination parachain on AssetHub, // and then reserve-transferred to the receiver's account on the destination parachain. if (destinationAddress.isAddress32()) { diff --git a/contracts/test/Gateway.t.sol b/contracts/test/Gateway.t.sol index 1d7def520c..9f4ff43174 100644 --- a/contracts/test/Gateway.t.sol +++ b/contracts/test/Gateway.t.sol @@ -922,8 +922,6 @@ contract GatewayTest is Test { // register token first uint256 fee = IGateway(address(gateway)).quoteRegisterTokenFee(); IGateway(address(gateway)).registerToken{value: fee}(address(token)); - - vm.expectRevert(Assets.InvalidDestinationFee.selector); fee = IGateway(address(gateway)).quoteSendTokenFee(address(token), destPara, 0); vm.expectRevert(Assets.InvalidDestinationFee.selector);