Commit 3905da53 authored by Viktor Velev's avatar Viktor Velev

Merge branch 'master' of https://gitlab.com/VikVelev/pun into frontend

parents 3ef7f763 fb11c9e8
......@@ -76,39 +76,39 @@ contract Better {
_;
}
uint[] tmpTest;
uint[] tmpTest2;
//uint[] tmpTest;
//uint[] tmpTest2;
constructor() public {
owner = msg.sender;
//DEBUG temp adds:
tmpTest.length = 2;
tmpTest[0] = 1;
tmpTest[1] = 2;
//tmpTest.length = 2;
//tmpTest[0] = 1;
//tmpTest[1] = 2;
//DEBUG temp adds:
tmpTest2.length = 2;
tmpTest2[0] = 1;
tmpTest2[1] = 2;
//tmpTest2.length = 2;
//tmpTest2[0] = 1;
//tmpTest2[1] = 2;
createEvent(1, 1629829173, "Bulg", "Germ", "Football", tmpTest);
//createEvent(1, 1629829173, "Bulg", "Germ", "Football", tmpTest);
updateBet(1, 1, 123123, [uint(1),3], 7043, 1);
updateBet(1, 2, 321321, [uint(2),1], 1034, 2);
//updateBet(1, 1, 123123, [uint(1),3], 7043, 1);
//updateBet(1, 2, 321321, [uint(2),1], 1034, 2);
createEvent(2, 1629829173, "Isla", "Germ", "Football", tmpTest2);
//createEvent(2, 1629829173, "Isla", "Germ", "Football", tmpTest2);
//updateBet(2, 1, 420, [uint(5),2], 2043, 1);
updateBet(2, 2, 453, [uint(1),3], 1014, 2);
//updateBet(2, 2, 453, [uint(1),3], 1014, 2);
//createEvent(3, 1629829173, "Germ", "Fran", "Football", tmpTest);
//updateBet(2, 1, 3562, [uint(0),0], 2043, 1);
//updateBet(2, 2, 23748, [uint(1),1], 5034, 2);
_placeBetObject(0x123, 100, 1, 321321);
_placeBetObject(0x123, 90, 2, 453);
//_placeBetObject(0x123, 100, 1, 321321);
//_placeBetObject(0x123, 90, 2, 453);
//_placeBetObject(0x123, 400, 3, 3562);
}
......
This diff is collapsed.
......@@ -7,39 +7,20 @@
<Market ID="1112" Number="2" Name="Correct Score Sets">
<Selection ID="11113" Number="1" Description="2 - 1" OddsDecimal="3.53" Participant="HOME" />
<Selection ID="11114" Number="2" Description="2 - 0" OddsDecimal="6.93" Participant="HOME" />
<Selection ID="11115" Number="3" Description="0 - 2" OddsDecimal="10.19" Participant="AWAY" />
<Selection ID="11116" Number="4" Description="1 - 2" OddsDecimal="6.15" Participant="AWAY" />
</Market>
</TennisEvent>
<FootballEvent ID="5097152" EventTime="2018-11-13T19:00:00" Home="Bulgaria" Away="Germany">
<Market ID="25179210" Number="1" Name="Match Result">
<Selection ID="60475643" Number="1" OddsDecimal="2.55" Participant="HOME" />
<Selection ID="60475645" Number="2" OddsDecimal="3.83" Participant="DRAW" />
<Selection ID="60475644" Number="3" OddsDecimal="2.31" Participant="AWAY" />
</Market>
<Market ID="25179211" Number="2" Name="Correct Score">
<Selection ID="60475646" Number="1" Description="0 - 0" OddsDecimal="47.48" Participant="DRAW" />
<Selection ID="60475652" Number="2" Description="1 - 1" OddsDecimal="5.42" Participant="DRAW" />
<Selection ID="60475657" Number="3" Description="2 - 2" OddsDecimal="14.83" Participant="DRAW" />
<Selection ID="60475647" Number="4" Description="1 - 0" OddsDecimal="14.32" Participant="HOME" />
<Selection ID="60475648" Number="5" Description="2 - 0" OddsDecimal="11.52" Participant="HOME" />
<Selection ID="60475653" Number="6" Description="2 - 1" OddsDecimal="6.53" Participant="HOME" />
<Selection ID="60475649" Number="7" Description="3 - 0" OddsDecimal="20.84" Participant="HOME" />
<Selection ID="60475654" Number="8" Description="3 - 1" OddsDecimal="23.65" Participant="HOME" />
<Selection ID="60475650" Number="9" Description="4 - 0" OddsDecimal="100.57" Participant="HOME" />
<Selection ID="60475651" Number="10" Description="0 - 1" OddsDecimal="13.47" Participant="AWAY" />
<Selection ID="60475655" Number="11" Description="0 - 2" OddsDecimal="10.19" Participant="AWAY" />
<Selection ID="60475656" Number="12" Description="1 - 2" OddsDecimal="6.15" Participant="AWAY" />
<Selection ID="60475658" Number="13" Description="0 - 3" OddsDecimal="17.34" Participant="AWAY" />
<Selection ID="60475659" Number="14" Description="1 - 3" OddsDecimal="20.92" Participant="AWAY" />
<Selection ID="60475660" Number="15" Description="0 - 4" OddsDecimal="78.71" Participant="AWAY" />
</Market>
<Market ID="25179248" Number="3" Name="Total Goals">
<Selection ID="60475768" Number="1" Description="0 Goals" OddsDecimal="48.44" />
<Selection ID="60475769" Number="2" Description="1 Goals" OddsDecimal="7.02" />
<Selection ID="60475770" Number="3" Description="2 Goals" OddsDecimal="2.72" />
<Selection ID="60475771" Number="4" Description="3 Goals" OddsDecimal="2.36" />
<Selection ID="60475772" Number="5" Description="4 Goals" OddsDecimal="5.49" />
</Market>
<Market ID="25179221" Number="4" Name="Penalty in Match">
<Selection ID="60475707" Number="1" Description="Yes" OddsDecimal="22.24" />
......
......@@ -48,7 +48,16 @@ export default class AdminPage extends Component {
let vals;
if(betAt.hasOwnProperty("Description")) {
vals = betAt.Description.split(" - ");
if(betAt.Description.search("Goals") >=0){
let k = betAt.Description.split(" ")[0];
vals = [+k, 0];
} else if(betAt.Description == "Yes") {
vals = [1,0];
} else if(betAt.Description == "No") {
vals = [0,0];
} else{
vals = betAt.Description.split(" - ");
}
} else {
if (betAt.Participant == "HOME") {
vals = [0, 0];
......@@ -69,8 +78,8 @@ export default class AdminPage extends Component {
try{
let res = await updateBet(attr.ID, betTypes[betType], at.ID, vals, odds, betAt.Number) //eslint-disable-line
} catch (e) {
console.log(e, "Error, trying again...")
k--;
console.log(e, "Error!")
//k--;
}
}
}
......
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