The transfer-to-main and transfer-from-main are v2 api, while it is using the legacy_endpoint in the code.