Commit efbafed9 authored by wildfirecode13's avatar wildfirecode13

uu

parent 83e9b7cc
......@@ -5,7 +5,7 @@ import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject";
import { sendWebNetWithToken } from "../sendWebNetWithToken";
import { sendLog, sendWebNet } from "../WebNet";
import { getWebData, sendLog, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName";
import { NoPrizePanel } from "./noprize";
import { notEnoughMoneyPanel } from "./notEnoughMoney";
......@@ -27,7 +27,12 @@ export class CostPanel extends Panel {
}
getPrize = async () => {
const result = await sendWebNet(WebNetName.getCreditCost, { toPlaywayId: 'dazzle', toActionId: 'drawPrize' });
const indexResult = getWebData(WebNetName.index);
const result = await sendWebNet(WebNetName.getCreditCost, {
toPlaywayId: 'dazzle', toActionId: 'drawPrize',
credits:indexResult.data.needCredits
});
if (result && result.success) {
const prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment