@jetthai/cuora 1.0.205 → 1.0.302-dev-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/.prettierignore +1 -0
  3. package/CHANGELOG.md +846 -0
  4. package/README.md +6 -0
  5. package/package.json +6 -9
  6. package/src/api/activity.js +43 -2
  7. package/src/api/auth.js +22 -7
  8. package/src/api/common.js +3 -1
  9. package/src/api/game.js +20 -7
  10. package/src/api/mailbox.js +9 -5
  11. package/src/api/payment.js +167 -19
  12. package/src/api/user.js +7 -0
  13. package/src/lib/fingerprint.js +9779 -0
  14. package/src/machine/activity/activity.js +111 -26
  15. package/src/machine/activity/activity_cash.js +159 -0
  16. package/src/machine/activity/cash_rain_activity.js +153 -0
  17. package/src/machine/activity/continue_deposit_activity.js +11 -2
  18. package/src/machine/activity/deposit_activity.js +13 -4
  19. package/src/machine/activity/diamond_shop_activity_cash.js +179 -0
  20. package/src/machine/activity/diamond_shop_activity_vn.js +54 -89
  21. package/src/machine/activity/fafafa_activity.js +34 -19
  22. package/src/machine/activity/{affiliate_invite_friends_activity.js → friend_invite_friends_activity.js} +70 -41
  23. package/src/machine/activity/index.js +22 -4
  24. package/src/machine/activity/instant_rebate_activity.js +217 -0
  25. package/src/machine/activity/invite_friends_activity.js +14 -14
  26. package/src/machine/activity/jackpot.js +74 -0
  27. package/src/machine/activity/otp_verified_activity.js +74 -0
  28. package/src/machine/activity/ranking_activity.js +11 -2
  29. package/src/machine/activity/roulette_activity_v2.js +90 -0
  30. package/src/machine/activity/sign_in_activity.js +21 -14
  31. package/src/machine/activity/sign_in_monthly_activity.js +65 -0
  32. package/src/machine/activity/specify_bets_activity.js +25 -3
  33. package/src/machine/activity/specify_turnover_activity.js +25 -3
  34. package/src/machine/activity/time_bomb_activity.js +11 -2
  35. package/src/machine/activity/vip_card_activity.js +140 -0
  36. package/src/machine/auth.js +141 -27
  37. package/src/machine/auth_otp_v2.js +10 -4
  38. package/src/machine/auth_otp_v3.js +11 -3
  39. package/src/machine/bank_binding.js +112 -12
  40. package/src/machine/bank_binding_amb.js +145 -0
  41. package/src/machine/common.js +113 -25
  42. package/src/machine/deposit/amb.js +92 -0
  43. package/src/machine/deposit/crypto.js +50 -29
  44. package/src/machine/deposit/crypto_bank.js +317 -0
  45. package/src/machine/deposit/crypto_bank_cash.js +287 -0
  46. package/src/machine/deposit/crypto_button.js +174 -39
  47. package/src/machine/deposit/crypto_cash.js +255 -0
  48. package/src/machine/deposit/crypto_qrcode.js +148 -0
  49. package/src/machine/deposit/crypto_qrcode_cash.js +131 -0
  50. package/src/machine/deposit/crypto_way.js +239 -0
  51. package/src/machine/deposit/crypto_way_cash.js +256 -0
  52. package/src/machine/deposit/deposit_fc.js +8 -5
  53. package/src/machine/deposit/direct.js +111 -16
  54. package/src/machine/deposit/direct_cash.js +217 -0
  55. package/src/machine/deposit/float.js +366 -0
  56. package/src/machine/deposit/index.js +43 -2
  57. package/src/machine/deposit/krway.js +151 -0
  58. package/src/machine/deposit/loadcard_cash.js +207 -0
  59. package/src/machine/deposit/loadcard_vn.js +191 -43
  60. package/src/machine/deposit/manual_cash.js +356 -0
  61. package/src/machine/deposit/manual_vn.js +182 -60
  62. package/src/machine/deposit/qrcode_cash.js +217 -0
  63. package/src/machine/deposit/qrcode_v2.js +285 -52
  64. package/src/machine/deposit/usdt.js +144 -0
  65. package/src/machine/deposit/usdt_cash.js +138 -0
  66. package/src/machine/deposit/vpay.js +359 -0
  67. package/src/machine/game_favorite_v2.js +70 -28
  68. package/src/machine/game_info.js +57 -0
  69. package/src/machine/game_search_cash.js +390 -0
  70. package/src/machine/game_search_v2.js +64 -24
  71. package/src/machine/game_v2_1.js +662 -0
  72. package/src/machine/honor_board_cash.js +63 -0
  73. package/src/machine/inbox.js +259 -34
  74. package/src/machine/index.js +24 -17
  75. package/src/machine/leaderboard.js +31 -8
  76. package/src/machine/navbar.js +57 -0
  77. package/src/machine/promotions.js +171 -0
  78. package/src/machine/reward.js +74 -7
  79. package/src/machine/reward_cash.js +219 -0
  80. package/src/machine/roulette_v2.js +276 -0
  81. package/src/machine/setting.js +5 -2
  82. package/src/machine/side_cash.js +110 -0
  83. package/src/machine/side_v2.js +33 -28
  84. package/src/machine/user_photo.js +65 -0
  85. package/src/machine/user_sign_up.js +117 -17
  86. package/src/machine/withdraw/index.js +23 -0
  87. package/src/machine/{withdraw_vn.js → withdraw/withdraw_amb.js} +146 -78
  88. package/src/machine/{withdraw_crypto.js → withdraw/withdraw_crypto.js} +220 -69
  89. package/src/machine/withdraw/withdraw_crypto2.js +540 -0
  90. package/src/machine/withdraw/withdraw_crypto_cash.js +319 -0
  91. package/src/machine/{withdraw_fc.js → withdraw/withdraw_fc.js} +2 -2
  92. package/src/machine/withdraw/withdraw_krway.js +207 -0
  93. package/src/machine/withdraw/withdraw_manual.js +595 -0
  94. package/src/machine/withdraw/withdraw_manual_cash.js +303 -0
  95. package/src/machine/withdraw/withdraw_vn.js +533 -0
  96. package/src/machine/withdraw/withdraw_vn2.js +548 -0
  97. package/src/request/request.js +10 -5
  98. package/src/util/constant.js +19 -1
  99. package/src/util/deviceToken.js +18 -8
  100. package/src/util/index.js +2 -1
  101. package/src/util/math.js +4 -0
  102. package/src/util/storage.js +22 -22
  103. package/dist/bundle.mjs +0 -18462
  104. package/rollup.config.js +0 -16
  105. package/src/machine/auth_otp.js +0 -201
  106. package/src/machine/deposit/qrcode_vn.js +0 -206
  107. package/src/machine/game.js +0 -285
  108. package/src/machine/game_favorite.js +0 -123
  109. package/src/machine/game_search.js +0 -244
  110. package/src/machine/game_v2.js +0 -356
package/rollup.config.js DELETED
@@ -1,16 +0,0 @@
1
- import replace from '@rollup/plugin-replace'
2
- import common from '@rollup/plugin-commonjs'
3
- import resolve from '@rollup/plugin-node-resolve'
4
-
5
- export default {
6
- input: 'src/index.js',
7
- output: {
8
- file: 'dist/bundle.mjs',
9
- format: 'es'
10
- },
11
- plugins: [
12
- replace({'process.env.NODE_ENV': JSON.stringify('production')}),
13
- common(),
14
- resolve()
15
- ]
16
- }
@@ -1,201 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import api from '../api/user.js'
3
-
4
- export default function (request) {
5
- return createMachine(
6
- {
7
- id: 'auth_otp',
8
- initial: 'fetching',
9
- context: {
10
- userInfo: null,
11
- error: null,
12
- countryCode: null,
13
- phone: null,
14
- number: null,
15
- requestId: null,
16
- ttl: 0,
17
- },
18
- states: {
19
- fetching: {
20
- invoke: {
21
- src: 'fetchUserInfo',
22
- onDone: {
23
- target: 'checking',
24
- actions: 'setUserInfo',
25
- },
26
- onError: {
27
- target: 'fail',
28
- },
29
- },
30
- },
31
- checking: {
32
- always: [
33
- { target: 'verified', cond: 'isVerified' },
34
- { target: 'notVerified', cond: 'isNotVerified' },
35
- ],
36
- },
37
- notVerified: {
38
- initial: 'checkingStatus',
39
- states: {
40
- checkingStatus: {
41
- invoke: {
42
- src: 'verify',
43
- onDone: {
44
- target: 'otp',
45
- actions: 'setVerificationData',
46
- },
47
- onError: {
48
- target: 'errorChecking',
49
- actions: 'setError',
50
- },
51
- },
52
- },
53
- errorChecking: {
54
- always: [{ target: 'phone', cond: 'hasNoPhone' }, { target: '#auth_otp.fail' }],
55
- },
56
- phone: {
57
- on: {
58
- SEND_PHONE: {
59
- target: 'sendingPhone',
60
- actions: 'setPhone',
61
- },
62
- },
63
- },
64
- sendingPhone: {
65
- invoke: {
66
- src: 'sendPhone',
67
- onDone: {
68
- target: 'checkingStatus',
69
- },
70
- onError: { target: 'phone' },
71
- },
72
- },
73
- otp: {
74
- type: 'parallel',
75
- states: {
76
- countdown: {
77
- after: {
78
- 1000: {
79
- target: 'countdown',
80
- actions: 'decreaseTtl',
81
- cond: (context) => context.ttl > 0,
82
- },
83
- },
84
- },
85
- verification: {
86
- initial: 'idle',
87
- states: {
88
- idle: {
89
- on: {
90
- SEND_OTP: {
91
- target: 'acknowledging',
92
- },
93
- RESET_OTP: {
94
- target: 'reset',
95
- },
96
- RESEND_PHONE: {
97
- target: '#auth_otp.notVerified.phone',
98
- },
99
- },
100
- },
101
- acknowledging: {
102
- invoke: {
103
- src: 'acknowledge',
104
- onDone: {
105
- target: '#auth_otp.verified',
106
- },
107
- onError: {
108
- target: 'idle',
109
- },
110
- },
111
- },
112
- reset: {
113
- invoke: {
114
- src: 'resetOtp',
115
- onDone: {
116
- target: 'idle',
117
- actions: 'setVerificationData',
118
- },
119
- onError: { target: 'idle' },
120
- },
121
- },
122
- },
123
- },
124
- },
125
- },
126
- },
127
- },
128
- verified: {},
129
- fail: {},
130
- },
131
- },
132
- {
133
- actions: {
134
- setUserInfo: assign((context, event) => {
135
- return {
136
- userInfo: event.data,
137
- }
138
- }),
139
- setVerificationData: assign((context, event) => {
140
- const { number, requestId, ttl } = event.data
141
- return {
142
- number,
143
- requestId,
144
- ttl,
145
- }
146
- }),
147
- decreaseTtl: assign((context, evnet) => {
148
- const ms = context.ttl
149
- return {
150
- ttl: Math.max(ms - 1000, 0),
151
- }
152
- }),
153
- setError: assign((context, event) => {
154
- return {
155
- error: event.data,
156
- }
157
- }),
158
- setPhone: assign((context, event) => {
159
- const { countryCode, phone } = event.data
160
- return {
161
- countryCode,
162
- phone,
163
- }
164
- }),
165
- },
166
- guards: {
167
- isVerified: (context, event) => {
168
- return context.userInfo?.verification_status === 1
169
- },
170
- isNotVerified: (context, event) => {
171
- return context.userInfo && context.userInfo.verification_status !== 1
172
- },
173
- hasNoPhone: (context, event) => {
174
- const { error } = context
175
- return error.code === 'ERR_F106'
176
- },
177
- },
178
- services: {
179
- fetchUserInfo: async (context, event) => {
180
- return await request.send(api.getUserInfo())
181
- },
182
- verify: async (context, event) => {
183
- return await request.send(api.verify())
184
- },
185
- sendPhone: async (context, event) => {
186
- const { countryCode, phone } = context
187
- return await request.send(api.updateUserInfo({ countryCode, phone }))
188
- },
189
- resetOtp: async (context, event) => {
190
- const { requestId, number } = context
191
- return await request.send(api.resetOtp({ requestId, number }))
192
- },
193
- acknowledge: async (context, event) => {
194
- const { requestId } = context
195
- const code = event.data
196
- return await request.send(api.acknowledge({ requestId, code }))
197
- },
198
- },
199
- }
200
- )
201
- }
@@ -1,206 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import payment from '../../api/payment.js'
3
-
4
- export default function (request) {
5
- return createMachine(
6
- {
7
- id: 'qrcode',
8
- initial: 'loading',
9
- context: {
10
- qrcodes: [],
11
- options: [],
12
-
13
- selectedQrcode: null,
14
- selectedAmount: null,
15
-
16
- calculation: null,
17
-
18
- paymentDetails: [],
19
- currentCategory: 'qrcode',
20
- currentMethod: null,
21
-
22
- result: null,
23
- },
24
- states: {
25
- loading: {
26
- invoke: {
27
- src: 'fetchInitData',
28
- onDone: {
29
- target: 'loaded',
30
- actions: 'setInitData',
31
- },
32
- onError: {
33
- target: 'fail',
34
- },
35
- },
36
- },
37
- loaded: {
38
- entry: 'reset',
39
- on: {
40
- SELECT_QRCODE: {
41
- actions: 'setQrcode',
42
- },
43
- SELECT_AMOUNT: {
44
- target: 'calculable',
45
- actions: 'addAmount',
46
- },
47
- KEY_IN: {
48
- target: 'calculable',
49
- actions: 'setAmount',
50
- },
51
- },
52
- },
53
- fail: {},
54
- calculable: {
55
- entry: 'clearCalculation',
56
- on: {
57
- SELECT_AMOUNT: {
58
- actions: 'addAmount',
59
- },
60
- KEY_IN: {
61
- actions: 'setAmount',
62
- },
63
- CALCULATE: {
64
- target: 'calculating',
65
- },
66
- BACK: {
67
- target: 'loaded',
68
- },
69
- },
70
- },
71
- calculating: {
72
- invoke: {
73
- src: 'fetchCalculation',
74
- onDone: {
75
- target: 'calculated',
76
- actions: 'setCalculation',
77
- },
78
- onError: {
79
- target: 'calculable',
80
- },
81
- },
82
- },
83
- calculated: {
84
- on: {
85
- SELECT_AMOUNT: {
86
- target: 'calculable',
87
- actions: 'addAmount',
88
- },
89
- KEY_IN: {
90
- target: 'calculable',
91
- actions: 'setAmount',
92
- },
93
- CONFIRM: {
94
- target: 'submitting',
95
- },
96
- BACK: {
97
- target: 'loaded',
98
- },
99
- CLEAR_CALCULATION: {
100
- target: 'calculable',
101
- actions: 'clearCalculation',
102
- },
103
- },
104
- },
105
- submitting: {
106
- invoke: {
107
- src: 'submitDeposit',
108
- onDone: {
109
- target: 'submitted',
110
- actions: 'setResult',
111
- },
112
- onError: {
113
- target: 'calculated',
114
- },
115
- },
116
- },
117
- submitted: {
118
- on: {
119
- SELECT_QRCODE: {
120
- target: 'loaded',
121
- actions: 'setQrcode',
122
- },
123
- },
124
- },
125
- },
126
- },
127
- {
128
- actions: {
129
- reset: assign((context, event) => {
130
- return {
131
- selectedAmount: null,
132
- calculation: null,
133
- }
134
- }),
135
- setInitData: assign((context, event) => {
136
- const paymentDetails = event.data
137
- const qrcodes = paymentDetails.filter((element) => element.category === context.currentCategory)
138
-
139
- return {
140
- paymentDetails,
141
- qrcodes,
142
- selectedQrcode: qrcodes[0],
143
- currentMethod: qrcodes[0].method,
144
- options: qrcodes[0].optional,
145
- }
146
- }),
147
- setQrcode: assign((context, event) => {
148
- return {
149
- selectedQrcode: event.data,
150
- currentMethod: event.data.method,
151
- options: event.data.optional,
152
- }
153
- }),
154
- addAmount: assign((context, event) => {
155
- return { selectedAmount: (context.selectedAmount || 0) + event.data }
156
- }),
157
- setAmount: assign((context, event) => {
158
- return { selectedAmount: event.data }
159
- }),
160
- setCalculation: assign((context, event) => {
161
- return {
162
- calculation: event.data,
163
- }
164
- }),
165
- clearCalculation: assign((context, event) => {
166
- return {
167
- calculation: null,
168
- }
169
- }),
170
- setResult: assign((context, event) => {
171
- return {
172
- result: event.data,
173
- }
174
- }),
175
- },
176
- services: {
177
- fetchInitData: async (context, event) => {
178
- return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
179
- },
180
- fetchBanksList: async (context, event) => {
181
- const { paymentDetails, currentCategory } = context
182
- const method = paymentDetails.find((item) => item.category === currentCategory)?.method
183
- return await request.send(payment.getBankList(method))
184
- },
185
- fetchCalculation: async (context, event) => {
186
- const { currentMethod, selectedAmount } = context
187
- return await request.send(
188
- payment.getDepositExpectedResult({
189
- method: currentMethod,
190
- amount: selectedAmount,
191
- })
192
- )
193
- },
194
- submitDeposit: async (context, event) => {
195
- const { currentMethod, selectedAmount } = context
196
- return await request.send(
197
- payment.submitDepositTransactionQrcode({
198
- method: currentMethod,
199
- amount: selectedAmount,
200
- })
201
- )
202
- },
203
- },
204
- }
205
- )
206
- }
@@ -1,285 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import api from '../api/game.js'
3
- import UAParser from 'ua-parser-js'
4
-
5
- // const UAParser = require('ua-parser-js')
6
-
7
- export default function (request) {
8
- return createMachine(
9
- {
10
- id: 'game',
11
- type: 'parallel',
12
- context: {
13
- roomId: null,
14
- room: null,
15
- list: [],
16
- gameList: [],
17
- // play params
18
- game: {
19
- provider: null,
20
- game_id: null,
21
- game_type: null,
22
- mapping_id: null,
23
- portrait: null,
24
- },
25
- lang: 'en_US',
26
- isMobile: new UAParser().getResult().device.type,
27
- gameURL: null,
28
- // game database
29
- sha: {
30
- category: null,
31
- status: null,
32
- },
33
- isCategoryChanged: false,
34
- isStatusChanged: false,
35
- statusMap: {},
36
- optionMap: {},
37
- },
38
- states: {
39
- flow: {
40
- initial: 'idle',
41
- states: {
42
- idle: {
43
- enter: 'clearGameInfo',
44
- on: {
45
- SET_ROOM: {
46
- target: 'loading',
47
- actions: 'setRoom',
48
- cond: (context, event) => {
49
- return context.room?.id !== event.data?.id
50
- },
51
- },
52
- ENTER_GAME: {
53
- target: 'connecting',
54
- actions: ['setGameInfo', 'setLang'],
55
- },
56
- },
57
- },
58
- loading: {
59
- invoke: {
60
- src: 'getRoomItems',
61
- onDone: {
62
- target: 'idle',
63
- actions: 'setList',
64
- },
65
- onError: {
66
- target: 'idle',
67
- actions: assign({ list: [] }),
68
- },
69
- },
70
- },
71
- connecting: {
72
- invoke: {
73
- src: 'connectGame',
74
- onDone: {
75
- target: 'playing',
76
- actions: 'setGameURL',
77
- },
78
- onError: {
79
- target: 'idle',
80
- },
81
- },
82
- },
83
- playing: {
84
- on: {
85
- EXIT_GAME: {
86
- target: 'disconnect',
87
- },
88
- },
89
- },
90
- disconnect: {
91
- invoke: {
92
- src: 'disconnectGame',
93
- onDone: {
94
- target: 'idle',
95
- },
96
- onError: {
97
- target: 'idle',
98
- },
99
- },
100
- },
101
- },
102
- },
103
- timer: {
104
- initial: 'fetchingGameSHA',
105
- states: {
106
- fetchingGameSHA: {
107
- invoke: {
108
- src: 'fetchGameSHA',
109
- onDone: {
110
- target: 'checking',
111
- actions: 'setGameSHA',
112
- },
113
- onError: {
114
- target: 'pending',
115
- },
116
- },
117
- },
118
- checking: {
119
- always: [
120
- { target: 'updatingStatus', cond: 'isStatusChanged' },
121
- { target: 'updatingCategory', cond: 'isCategoryChanged' },
122
- { target: 'pending' },
123
- ],
124
- },
125
- updatingStatus: {
126
- invoke: {
127
- src: 'fetchStatus',
128
- onDone: {
129
- target: 'updatingOption',
130
- actions: ['setStatus'],
131
- },
132
- onError: {
133
- target: 'pending',
134
- },
135
- },
136
- },
137
- updatingOption: {
138
- invoke: {
139
- src: 'fetchOption',
140
- onDone: {
141
- target: 'updatingCategory',
142
- actions: 'mergeOption',
143
- },
144
- onError: {
145
- target: 'pending',
146
- },
147
- },
148
- },
149
- updatingCategory: {
150
- invoke: {
151
- src: 'getRoomItems',
152
- onDone: {
153
- target: 'pending',
154
- actions: 'setList',
155
- },
156
- onError: {
157
- target: 'pending',
158
- },
159
- },
160
- },
161
- pending: {
162
- after: {
163
- 20000: {
164
- target: 'fetchingGameSHA',
165
- },
166
- },
167
- },
168
- },
169
- },
170
- },
171
- },
172
- {
173
- actions: {
174
- setRoomId: assign((context, event) => {
175
- return { roomId: event.roomId }
176
- }),
177
- setRoom: assign((context, event) => {
178
- return {
179
- room: event.data,
180
- roomId: event.data.id,
181
- }
182
- }),
183
- setList: assign((context, event) => {
184
- const { statusMap, optionMap } = context
185
- const { list = [] } = event.data
186
- const gameList = list
187
- .map((item) => {
188
- if (item.id) {
189
- item.room = true
190
- return item
191
- }
192
-
193
- const code = item.g
194
- if (!code || !optionMap[code]) {
195
- return
196
- }
197
-
198
- return {
199
- ...optionMap[code],
200
- code,
201
- system_enable: statusMap[code][0],
202
- }
203
- })
204
- .filter((item) => item && !item.header)
205
- .sort((a, b) => a.system_enable - b.system_enable)
206
- return { list, gameList }
207
- }),
208
- setGameURL: assign({
209
- gameURL: (context, event) => {
210
- return event.data.gameURL
211
- },
212
- }),
213
- clearGameInfo: assign((context, event) => {
214
- return { game: { provider: null, game_id: null, game_type: null, mapping_id: null } }
215
- }),
216
- setGameInfo: assign((context, event) => {
217
- const { provider, game_id, game_type, mapping_id, portrait } = event.data.game
218
- return { game: { provider, game_id, game_type, mapping_id, portrait } }
219
- }),
220
- setLang: assign((context, event) => {
221
- const lang = event.data.locale.replace('-', '_')
222
- return { lang }
223
- }),
224
- setGameSHA: assign((context, event) => {
225
- const { sha } = context
226
- const newSha = event.data
227
- return {
228
- sha: newSha,
229
- isCategoryChanged: !sha.category || sha.category !== newSha.category,
230
- isStatusChanged: !sha.status || sha.status !== newSha.status,
231
- }
232
- }),
233
- setStatus: assign((context, event) => {
234
- return {
235
- statusMap: event.data,
236
- }
237
- }),
238
- mergeOption: assign((context, event) => {
239
- const { optionMap } = context
240
- return {
241
- optionMap: { ...optionMap, ...event.data },
242
- }
243
- }),
244
- },
245
- guards: {
246
- isCategoryChanged: (context, event) => context.isCategoryChanged,
247
- isStatusChanged: (context, event) => context.isStatusChanged,
248
- },
249
- services: {
250
- getRoomItems: async (context, event) => {
251
- return await request.send(api.getGameCategory({ id: context.roomId }))
252
- },
253
- connectGame: async (context, event) => {
254
- const { lang, isMobile } = context
255
- const { provider, game_id, game_type, mapping_id } = context.game
256
- const params = {
257
- provider_id: provider,
258
- game_id: game_id,
259
- gametype_id: game_type,
260
- mapping_id: mapping_id,
261
- is_demo: false,
262
- is_mobile: isMobile,
263
- lang,
264
- return_url: window.location.href,
265
- }
266
- const { redirect_url } = await request.send(api.playGame(params))
267
- return { gameURL: redirect_url }
268
- },
269
- disconnectGame: async (context, event) => {
270
- const uid_site = event.data
271
- return await request.send(api.logoutGame({ uid_site, provider_id: context.game.provider }))
272
- },
273
- fetchOption: async (context, event) => {
274
- return await request.send(api.getOptionMap())
275
- },
276
- fetchGameSHA: async (context, event) => {
277
- return await request.send(api.getGameSHA())
278
- },
279
- fetchStatus: async (context, event) => {
280
- return await request.send(api.getGameStatus())
281
- },
282
- },
283
- }
284
- )
285
- }