You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
559 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* RPA 地址 commit 模式:
* - real(默认):MotherShip 联想 + place commit + 真实 axel/quote
* - mock:仅内部 plumbing,跳过 place commit,MotherShip 不会返回真实报价(禁止用于对账)
*/
export type RpaAddressMode = "real" | "mock";
export function getRpaAddressMode(): RpaAddressMode {
const raw = process.env.RPA_ADDRESS_MODE?.trim().toLowerCase();
if (raw === "mock") {
return "mock";
}
return "real";
}
export function isRpaAddressMockMode(): boolean {
return getRpaAddressMode() === "mock";
}