```\n      require(msg.sender == txData.user || recoverSignature(txData.transactionId, relayerFee, "cancel", signature) == txData.user, "#C:022");\n\n      Asset.transferAsset(txData.sendingAssetId, payable(msg.sender), relayerFee);\n    }\n\n    // Get the amount to refund the user\n    uint256 toRefund;\n    unchecked {\n      toRefund = amount - relayerFee;\n    }\n\n    // Return locked funds to sending chain fallback\n    if (toRefund > 0) {\n      Asset.transferAsset(txData.sendingAssetId, payable(txData.sendingChainFallback), toRefund);\n    }\n  }\n\n} else {\n  // Receiver side, router liquidity is returned\n  if (txData.expiry >= block.timestamp) {\n    // Timeout has not expired and tx may only be cancelled by user\n    // Validate signature\n    require(msg.sender == txData.user || recoverSignature(txData.transactionId, relayerFee, "cancel", signature) == txData.user, "#C:022");\n```\n