Skip to content

Commit 4eb7d6d

Browse files
authored
Merge pull request #52 from betfinio/dev
Release to prod/games
2 parents 2b46495 + 22b1a74 commit 4eb7d6d

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

src/lib/gql/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const populateStonesBet = (data: PlayerBetsQuery): StonesBet[] => {
100100
player: bet.player,
101101
order: Number(bet.order),
102102
game: STONES,
103-
round: Number(bet.round),
103+
round: Number(bet.round.round),
104104
amount: BigInt(bet.amount),
105105
address: bet.bet,
106106
created: bet.blockTimestamp,

src/schema.graphql

+25-24
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
query AllRounds($count: Int) {
2-
roundStarts(first: $count, orderBy: blockTimestamp, orderDirection: desc) {
3-
round
4-
blockTimestamp
5-
blockNumber
6-
transactionHash
7-
}
2+
roundStarts: rounds(first: $count, orderBy: started, orderDirection: desc) {
3+
round
4+
}
85
}
96

107
query PlayerBetsByRound($round: BigInt, $player: Bytes) {
11-
betCreateds(where: { round: $round, player: $player }, orderBy: blockTimestamp, orderDirection: desc) {
12-
player
13-
round
14-
amount
15-
bet
16-
side
17-
order
18-
blockTimestamp
19-
}
8+
betCreateds: bets(where: { round_: {round: $round}, player: $player }, orderBy: blockTimestamp, orderDirection: desc) {
9+
player
10+
round {
11+
round
12+
}
13+
amount
14+
bet
15+
side
16+
order
17+
blockTimestamp
18+
}
2019
}
2120

2221
query PlayerBets($player: Bytes) {
23-
betCreateds(where: { player: $player }, orderBy: blockTimestamp, orderDirection: desc) {
24-
player
25-
round
26-
amount
27-
bet
28-
side
29-
order
30-
blockTimestamp
31-
}
22+
betCreateds: bets(where: { player: $player }, orderBy: blockTimestamp, orderDirection: desc) {
23+
player
24+
round {
25+
round
26+
}
27+
amount
28+
bet
29+
side
30+
order
31+
blockTimestamp
32+
}
3233
}

0 commit comments

Comments
 (0)