Skip to content

Commit b67f925

Browse files
committed
Update since summer sale ended
1 parent a502244 commit b67f925

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/js/states/preload.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,19 @@ export class PreloadState extends GameState {
4747
}
4848

4949
async fetchDiscounts() {
50-
// Summer sale specific
51-
globalConfig.currentDiscount = 60;
52-
53-
// Regular
54-
// await timeoutPromise(
55-
// fetch("https://analytics.shapez.io/v1/discounts")
56-
// .then(res => res.json())
57-
// .then(data => {
58-
// globalConfig.currentDiscount = Number(data["1318690"].data.price_overview.discount_percent);
59-
// logger.log("Fetched current discount:", globalConfig.currentDiscount);
60-
// }),
61-
// 2000
62-
// ).catch(err => {
63-
// logger.warn("Failed to fetch current discount:", err);
64-
// });
50+
await timeoutPromise(
51+
fetch("https://analytics.shapez.io/v1/discounts")
52+
.then(res => res.json())
53+
.then(data => {
54+
globalConfig.currentDiscount = Number(
55+
data["1318690"].data.price_overview.discount_percent
56+
);
57+
logger.log("Fetched current discount:", globalConfig.currentDiscount);
58+
}),
59+
2000
60+
).catch(err => {
61+
logger.warn("Failed to fetch current discount:", err);
62+
});
6563
}
6664

6765
async sendBeacon() {

0 commit comments

Comments
 (0)