Only check legacy conditions if SellCurrency is absent
Some checks failed
Build / build (pull_request) Failing after 1m15s

This commit is contained in:
2025-11-11 17:03:13 -05:00
parent 8996ec7912
commit 9c70e90db6

View File

@@ -28,13 +28,14 @@ export const sellController: RequestHandler = async (req, res) => {
let sellCurrency = "SC_RegularCredits";
if (payload.SellCurrency) {
sellCurrency = payload.SellCurrency;
}
if (payload.SellForFusionPoints || payload.SellForPrimeBucks) {
if (payload.SellForFusionPoints) {
sellCurrency = "SC_FusionPoints";
}
if (payload.SellForPrimeBucks) {
sellCurrency = "SC_PrimeBucks";
} else {
if (payload.SellForFusionPoints || payload.SellForPrimeBucks) {
if (payload.SellForFusionPoints) {
sellCurrency = "SC_FusionPoints";
}
if (payload.SellForPrimeBucks) {
sellCurrency = "SC_PrimeBucks";
}
}
}
if (sellCurrency == "SC_RegularCredits") {
@@ -358,7 +359,7 @@ interface ISellRequest {
WeaponSkins?: ISellItem[]; // SNS specific field
};
SellPrice: number;
SellCurrency:
SellCurrency?:
| "SC_RegularCredits"
| "SC_PrimeBucks"
| "SC_FusionPoints"