refactor logic for send request

This commit is contained in:
Kostya
2024-01-20 20:02:42 +03:00
parent e9e1f95535
commit 65e59d0100

View File

@@ -164,10 +164,9 @@ export default {
} }
}, },
watch: { watch: {
amountCrystals(CrystalsCount) { async amountCrystals(CrystalsCount) {
if (CrystalsCount >= 1) { if (CrystalsCount >= 1) {
this.amountSaveCrystals = CrystalsCount this.amountSaveCrystals = CrystalsCount
setTimeout(async () => {
try { try {
await GetPercentageSteps(this.amountSaveCrystals) await GetPercentageSteps(this.amountSaveCrystals)
.then((response) => { .then((response) => {
@@ -178,7 +177,6 @@ export default {
catch (e) { catch (e) {
console.error('Error in Percantage', e) console.error('Error in Percantage', e)
} }
}, 1500)
} }
} }
}, },