@@ -14,7 +14,7 @@ module.exports = class StakeDice extends BaseDice {
14
14
}
15
15
16
16
async login ( userName , password , twoFactor , apiKey , req ) {
17
- let data = "query{user {activeServerSeed { seedHash seed nonce} activeClientSeed{seed} id balances{available{currency amount}} statistic {game bets wins losses amount profit currency}}}" ;
17
+ let data = "query{user {activeServerSeed { seedHash seed nonce} activeClientSeed{seed} id balances{available{currency amount}} statistic {game bets wins losses betAmount profit currency}}}" ;
18
18
let ret = await this . _send ( '' , 'POST' , data , apiKey ) ;
19
19
req . session . accessToken = apiKey ;
20
20
req . session . username = apiKey ;
@@ -31,7 +31,7 @@ module.exports = class StakeDice extends BaseDice {
31
31
if ( ! info ) {
32
32
return false ;
33
33
}
34
- let data = "query{user {activeServerSeed { seedHash seed nonce} activeClientSeed{seed} id balances{available{currency amount}} statistic {game bets wins losses amount profit currency}}}" ;
34
+ let data = "query{user {activeServerSeed { seedHash seed nonce} activeClientSeed{seed} id balances{available{currency amount}} statistic {game bets wins losses betAmount profit currency}}}" ;
35
35
let ret = await this . _send ( '' , 'POST' , data , req . session . accessToken ) ;
36
36
ret = ret . user ;
37
37
let userinfo = {
@@ -53,7 +53,7 @@ module.exports = class StakeDice extends BaseDice {
53
53
userinfo . wins = ret . statistic [ i ] . wins ;
54
54
userinfo . bets = ret . statistic [ i ] . bets ;
55
55
userinfo . losses = ret . statistic [ i ] . losses ;
56
- userinfo . wagered = parseFloat ( ret . statistic [ i ] . amount ) . toFixed ( 8 ) ;
56
+ userinfo . wagered = parseFloat ( ret . statistic [ i ] . betAmount ) . toFixed ( 8 ) ;
57
57
}
58
58
}
59
59
userinfo . success = 'true' ;
@@ -64,7 +64,7 @@ module.exports = class StakeDice extends BaseDice {
64
64
65
65
async clear ( req ) {
66
66
console . log ( 'loading....' ) ;
67
- let data = "query{user {activeServerSeed { seedHash seed nonce} activeClientSeed{seed} id balances{available{currency amount}} statistic {game bets wins losses amount profit currency}}}" ;
67
+ let data = "query{user {activeServerSeed { seedHash seed nonce} activeClientSeed{seed} id balances{available{currency amount}} statistic {game bets wins losses betAmount profit currency}}}" ;
68
68
let ret = await this . _send ( '' , 'POST' , data , req . session . accessToken ) ;
69
69
ret = ret . user ;
70
70
let info = { } ;
@@ -98,7 +98,7 @@ module.exports = class StakeDice extends BaseDice {
98
98
userinfo . wins = ret . statistic [ i ] . wins ;
99
99
userinfo . bets = ret . statistic [ i ] . bets ;
100
100
userinfo . losses = ret . statistic [ i ] . losses ;
101
- userinfo . wagered = parseFloat ( ret . statistic [ i ] . amount ) . toFixed ( 8 ) ;
101
+ userinfo . wagered = parseFloat ( ret . statistic [ i ] . betAmount ) . toFixed ( 8 ) ;
102
102
}
103
103
}
104
104
userinfo . success = 'true' ;
@@ -118,7 +118,7 @@ module.exports = class StakeDice extends BaseDice {
118
118
target = Math . floor ( ( req . body . Chance * 10000 ) ) - 1 ;
119
119
}
120
120
target = parseFloat ( target / 10000 ) . toFixed ( 2 ) ;
121
- let data = " mutation{diceRoll(amount:" + amount + ",target:" + target + ",condition:" + condition + ",currency:" + currency + ") { id nonce currency amount payout state { ... on CasinoGameDice { result target condition } } createdAt serverSeed{seedHash seed nonce} clientSeed{seed} user{balances{available{amount currency}} statistic{game bets wins losses amount profit currency}}}}" ;
121
+ let data = " mutation{diceRoll(amount:" + amount + ",target:" + target + ",condition:" + condition + ",currency:" + currency + ") { id nonce currency amount payout state { ... on CasinoGameDice { result target condition } } createdAt serverSeed{seedHash seed nonce} clientSeed{seed} user{balances{available{amount currency}} statistic{game bets wins losses betAmount profit currency}}}}" ;
122
122
let ret = await this . _send ( '' , 'POST' , data , req . session . accessToken ) ;
123
123
let info = req . session . info ;
124
124
let betInfo = ret . diceRoll ;
0 commit comments