diff --git a/feature-wallet-api/src/main/java/io/novafoundation/nova/feature_wallet_api/domain/model/CrossChainTransfersConfiguration.kt b/feature-wallet-api/src/main/java/io/novafoundation/nova/feature_wallet_api/domain/model/CrossChainTransfersConfiguration.kt index 706c6c58ea..23bd7973c6 100644 --- a/feature-wallet-api/src/main/java/io/novafoundation/nova/feature_wallet_api/domain/model/CrossChainTransfersConfiguration.kt +++ b/feature-wallet-api/src/main/java/io/novafoundation/nova/feature_wallet_api/domain/model/CrossChainTransfersConfiguration.kt @@ -64,7 +64,11 @@ sealed class AssetLocationPath { } enum class XcmTransferType { - X_TOKENS, XCM_PALLET_RESERVE, XCM_PALLET_TELEPORT, UNKNOWN + X_TOKENS, + XCM_PALLET_RESERVE, + XCM_PALLET_TELEPORT, + XCM_PALLET_TRANSFER_ASSETS, + UNKNOWN } enum class XCMInstructionType { diff --git a/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/mappers/CrossChain.kt b/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/mappers/CrossChain.kt index c1e82e458f..e7b844d398 100644 --- a/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/mappers/CrossChain.kt +++ b/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/mappers/CrossChain.kt @@ -115,6 +115,7 @@ private fun mapXcmTransferTypeFromRemote(remote: String): XcmTransferType { "xtokens" -> XcmTransferType.X_TOKENS "xcmpallet" -> XcmTransferType.XCM_PALLET_RESERVE "xcmpallet-teleport" -> XcmTransferType.XCM_PALLET_TELEPORT + "xcmpallet-transferAssets" -> XcmTransferType.XCM_PALLET_TRANSFER_ASSETS else -> XcmTransferType.UNKNOWN } } diff --git a/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/RealCrossChainTransactor.kt b/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/RealCrossChainTransactor.kt index 1c8532640d..adc1f4cd52 100644 --- a/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/RealCrossChainTransactor.kt +++ b/feature-wallet-impl/src/main/java/io/novafoundation/nova/feature_wallet_impl/data/network/crosschain/RealCrossChainTransactor.kt @@ -95,6 +95,7 @@ class RealCrossChainTransactor( XcmTransferType.X_TOKENS -> xTokensTransfer(configuration, transfer, crossChainFee) XcmTransferType.XCM_PALLET_RESERVE -> xcmPalletReserveTransfer(configuration, transfer, crossChainFee) XcmTransferType.XCM_PALLET_TELEPORT -> xcmPalletTeleport(configuration, transfer, crossChainFee) + XcmTransferType.XCM_PALLET_TRANSFER_ASSETS -> xcmPalletTransferAssets(configuration, transfer, crossChainFee) XcmTransferType.UNKNOWN -> throw IllegalArgumentException("Unknown transfer type") } } @@ -126,6 +127,20 @@ class RealCrossChainTransactor( } private fun destWeightEncodable(weight: Weight): Any = weight + + private suspend fun ExtrinsicBuilder.xcmPalletTransferAssets( + configuration: CrossChainTransferConfiguration, + assetTransfer: AssetTransfer, + crossChainFee: Balance + ) { + xcmPalletTransfer( + configuration = configuration, + assetTransfer = assetTransfer, + crossChainFee = crossChainFee, + callName = "transfer_assets" + ) + } + private suspend fun ExtrinsicBuilder.xcmPalletReserveTransfer( configuration: CrossChainTransferConfiguration, assetTransfer: AssetTransfer,