Skip to content

Commit

Permalink
reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Apr 12, 2024
1 parent 42120cf commit f08f95d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions contracts/src/Assets.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()) {
Expand Down
2 changes: 0 additions & 2 deletions contracts/test/Gateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f08f95d

Please sign in to comment.