@@ -14,7 +14,7 @@ module.exports = class StakeDice extends BaseDice {
1414 }
1515
1616 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}}}" ;
1818 let ret = await this . _send ( '' , 'POST' , data , apiKey ) ;
1919 req . session . accessToken = apiKey ;
2020 req . session . username = apiKey ;
@@ -31,7 +31,7 @@ module.exports = class StakeDice extends BaseDice {
3131 if ( ! info ) {
3232 return false ;
3333 }
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}}}" ;
3535 let ret = await this . _send ( '' , 'POST' , data , req . session . accessToken ) ;
3636 ret = ret . user ;
3737 let userinfo = {
@@ -53,7 +53,7 @@ module.exports = class StakeDice extends BaseDice {
5353 userinfo . wins = ret . statistic [ i ] . wins ;
5454 userinfo . bets = ret . statistic [ i ] . bets ;
5555 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 ) ;
5757 }
5858 }
5959 userinfo . success = 'true' ;
@@ -64,7 +64,7 @@ module.exports = class StakeDice extends BaseDice {
6464
6565 async clear ( req ) {
6666 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}}}" ;
6868 let ret = await this . _send ( '' , 'POST' , data , req . session . accessToken ) ;
6969 ret = ret . user ;
7070 let info = { } ;
@@ -98,7 +98,7 @@ module.exports = class StakeDice extends BaseDice {
9898 userinfo . wins = ret . statistic [ i ] . wins ;
9999 userinfo . bets = ret . statistic [ i ] . bets ;
100100 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 ) ;
102102 }
103103 }
104104 userinfo . success = 'true' ;
@@ -118,7 +118,7 @@ module.exports = class StakeDice extends BaseDice {
118118 target = Math . floor ( ( req . body . Chance * 10000 ) ) - 1 ;
119119 }
120120 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}}}}" ;
122122 let ret = await this . _send ( '' , 'POST' , data , req . session . accessToken ) ;
123123 let info = req . session . info ;
124124 let betInfo = ret . diceRoll ;
0 commit comments