@jetthai/cuora 1.1.332-dev-7 → 1.1.332-tg

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.
@@ -9,7 +9,6 @@ import game_search_cash from './game_search_cash.js'
9
9
  import game_search_v2 from './game_search_v2.js'
10
10
  import game_hot_new from './game_hot_new.js'
11
11
  import game_info from './game_info.js'
12
- import game_replay from './game_replay.js'
13
12
  import inbox from './inbox.js'
14
13
  import merge from './merge.js'
15
14
  import payment_data from './payment_data.js'
@@ -38,7 +37,6 @@ import honor_board_cash from './honor_board_cash.js'
38
37
  import honor_board from './honor_board.js'
39
38
  import user_photo from './user_photo.js'
40
39
  import navbar from './navbar.js'
41
- import websocket from './websocket.js'
42
40
 
43
41
  export default {
44
42
  ...activity,
@@ -51,7 +49,6 @@ export default {
51
49
  game_search_v2,
52
50
  game_hot_new,
53
51
  game_info,
54
- game_replay,
55
52
  inbox,
56
53
  merge,
57
54
  payment_data,
@@ -81,5 +78,4 @@ export default {
81
78
  user_photo,
82
79
  navbar,
83
80
  ...withdraw,
84
- websocket,
85
81
  }
@@ -58,35 +58,39 @@ export default function (request) {
58
58
  src: 'withdrawCheck',
59
59
  onDone: [
60
60
  {
61
- target: 'checkingWithdrawStatus',
61
+ target: 'notWithdrawMinDepositAmount',
62
+ cond: 'isNotWithdrawMinDepositAmount',
62
63
  actions: assign((context, event) => {
63
64
  return {
64
65
  withdrawCheck: event.data,
65
66
  }
66
67
  }),
67
68
  },
69
+ {
70
+ target: 'passWithdrawCooldownTime',
71
+ cond: 'isPassWithdrawCooldownTime',
72
+ actions: assign((context, event) => {
73
+ return {
74
+ withdrawCheck: event.data,
75
+ }
76
+ }),
77
+ },
78
+ {
79
+ target: 'notWithdrawable',
80
+ cond: 'isNotWithdrawable',
81
+ },
82
+ {
83
+ target: 'withdrawable',
84
+ },
68
85
  ],
69
86
  onError: {
70
87
  target: '#withdraw_krway.fail',
71
88
  },
72
89
  },
73
90
  },
74
- checkingWithdrawStatus: {
75
- always: [
76
- // 提款最低存款金額
77
- { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
78
- // 提款冷卻時間
79
- { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
80
- // 提款服務時間
81
- { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
82
- { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
83
- { target: 'withdrawable' },
84
- ],
85
- },
86
91
  notWithdrawMinDepositAmount: {},
87
92
  passWithdrawCooldownTime: {},
88
93
  inProcessing: {},
89
- withdrawServiceTime: {},
90
94
  notWithdrawable: {},
91
95
  withdrawable: {
92
96
  on: {
@@ -176,16 +180,10 @@ export default function (request) {
176
180
  return !enableWithdraw || balance < minWithdrawAmount
177
181
  },
178
182
  isNotWithdrawMinDepositAmount: (context, event) => {
179
- const { withdrawCheck } = context
180
- return !withdrawCheck?.passDepositeLimit
183
+ return !event.data?.passDepositeLimit
181
184
  },
182
185
  isPassWithdrawCooldownTime: (context, event) => {
183
- const { withdrawCheck } = context
184
- return !withdrawCheck?.passWithdrawCooldownTime
185
- },
186
- isNotWIthdrawServiceTime: (context, event) => {
187
- const { withdrawCheck } = context
188
- return !withdrawCheck?.withdrawInServiceTime
186
+ return !event.data?.passWithdrawCooldownTime
189
187
  },
190
188
  },
191
189
  services: {
@@ -168,35 +168,41 @@ export default function (request) {
168
168
  invoke: {
169
169
  src: 'withdrawCheck',
170
170
  onDone: [
171
+ // 提款最低存款金額
171
172
  {
172
- target: 'checkingWithdrawStatus',
173
+ target: 'notWithdrawMinDepositAmount',
174
+ cond: 'isNotWithdrawMinDepositAmount',
173
175
  actions: assign((context, event) => {
174
176
  return {
175
177
  withdrawCheck: event.data,
176
178
  }
177
179
  }),
178
180
  },
181
+ // 提款冷卻時間
182
+ {
183
+ target: 'passWithdrawCooldownTime',
184
+ cond: 'isPassWithdrawCooldownTime',
185
+ actions: assign((context, event) => {
186
+ return {
187
+ withdrawCheck: event.data,
188
+ }
189
+ }),
190
+ },
191
+ {
192
+ target: 'notWithdrawable',
193
+ cond: 'isNotWithdrawable',
194
+ },
195
+ {
196
+ target: 'withdrawable',
197
+ },
179
198
  ],
180
199
  onError: {
181
200
  target: '#withdraw_manual.fail',
182
201
  },
183
202
  },
184
203
  },
185
- checkingWithdrawStatus: {
186
- always: [
187
- // 提款最低存款金額
188
- { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
189
- // 提款冷卻時間
190
- { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
191
- // 提款服務時間
192
- { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
193
- { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
194
- { target: 'withdrawable' },
195
- ],
196
- },
197
204
  notWithdrawMinDepositAmount: {},
198
205
  passWithdrawCooldownTime: {},
199
- withdrawServiceTime: {},
200
206
  notWithdrawable: {},
201
207
  unbound: {
202
208
  // to bank_binding.js
@@ -519,16 +525,10 @@ export default function (request) {
519
525
  return event.data?.status === 'otp-verifying'
520
526
  },
521
527
  isNotWithdrawMinDepositAmount: (context, event) => {
522
- const { withdrawCheck } = context
523
- return !withdrawCheck?.passDepositeLimit
528
+ return !event.data?.passDepositeLimit
524
529
  },
525
530
  isPassWithdrawCooldownTime: (context, event) => {
526
- const { withdrawCheck } = context
527
- return !withdrawCheck?.passWithdrawCooldownTime
528
- },
529
- isNotWIthdrawServiceTime: (context, event) => {
530
- const { withdrawCheck } = context
531
- return !withdrawCheck?.withdrawInServiceTime
531
+ return !event.data?.passWithdrawCooldownTime
532
532
  },
533
533
  },
534
534
  services: {
@@ -142,34 +142,38 @@ export default function (request) {
142
142
  src: 'withdrawCheck',
143
143
  onDone: [
144
144
  {
145
- target: 'checkingWithdrawStatus',
145
+ target: 'notWithdrawMinDepositAmount',
146
+ cond: 'isNotWithdrawMinDepositAmount',
146
147
  actions: assign((context, event) => {
147
148
  return {
148
149
  withdrawCheck: event.data,
149
150
  }
150
151
  }),
151
152
  },
153
+ {
154
+ target: 'passWithdrawCooldownTime',
155
+ cond: 'isPassWithdrawCooldownTime',
156
+ actions: assign((context, event) => {
157
+ return {
158
+ withdrawCheck: event.data,
159
+ }
160
+ }),
161
+ },
162
+ {
163
+ target: 'notWithdrawable',
164
+ cond: 'isNotWithdrawable',
165
+ },
166
+ {
167
+ target: 'withdrawable',
168
+ },
152
169
  ],
153
170
  onError: {
154
171
  target: '#withdraw_vn.fail',
155
172
  },
156
173
  },
157
174
  },
158
- checkingWithdrawStatus: {
159
- always: [
160
- // 提款最低存款金額
161
- { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
162
- // 提款冷卻時間
163
- { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
164
- // 提款服務時間
165
- { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
166
- { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
167
- { target: 'withdrawable' },
168
- ],
169
- },
170
175
  notWithdrawMinDepositAmount: {},
171
176
  passWithdrawCooldownTime: {},
172
- withdrawServiceTime: {},
173
177
  notWithdrawable: {},
174
178
  unbound: {
175
179
  // to bank_binding.js
@@ -455,16 +459,10 @@ export default function (request) {
455
459
  },
456
460
  isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
457
461
  isNotWithdrawMinDepositAmount: (context, event) => {
458
- const { withdrawCheck } = context
459
- return !withdrawCheck?.passDepositeLimit
462
+ return !event.data?.passDepositeLimit
460
463
  },
461
464
  isPassWithdrawCooldownTime: (context, event) => {
462
- const { withdrawCheck } = context
463
- return !withdrawCheck?.passWithdrawCooldownTime
464
- },
465
- isNotWIthdrawServiceTime: (context, event) => {
466
- const { withdrawCheck } = context
467
- return !withdrawCheck?.withdrawInServiceTime
465
+ return !event.data?.passWithdrawCooldownTime
468
466
  },
469
467
  },
470
468
  services: {
@@ -170,34 +170,38 @@ export default function (request) {
170
170
  src: 'withdrawCheck',
171
171
  onDone: [
172
172
  {
173
- target: 'checkingWithdrawStatus',
173
+ target: 'notWithdrawMinDepositAmount',
174
+ cond: 'isNotWithdrawMinDepositAmount',
174
175
  actions: assign((context, event) => {
175
176
  return {
176
177
  withdrawCheck: event.data,
177
178
  }
178
179
  }),
179
180
  },
181
+ {
182
+ target: 'passWithdrawCooldownTime',
183
+ cond: 'isPassWithdrawCooldownTime',
184
+ actions: assign((context, event) => {
185
+ return {
186
+ withdrawCheck: event.data,
187
+ }
188
+ }),
189
+ },
190
+ {
191
+ target: 'notWithdrawable',
192
+ cond: 'isNotWithdrawable',
193
+ },
194
+ {
195
+ target: 'withdrawable',
196
+ },
180
197
  ],
181
198
  onError: {
182
199
  target: '#withdraw_vn2.fail',
183
200
  },
184
201
  },
185
202
  },
186
- checkingWithdrawStatus: {
187
- always: [
188
- // 提款最低存款金額
189
- { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
190
- // 提款冷卻時間
191
- { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
192
- // 提款服務時間
193
- { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
194
- { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
195
- { target: 'withdrawable' },
196
- ],
197
- },
198
203
  notWithdrawMinDepositAmount: {},
199
204
  passWithdrawCooldownTime: {},
200
- withdrawServiceTime: {},
201
205
  notWithdrawable: {},
202
206
  unbound: {
203
207
  // to bank_binding.js
@@ -480,16 +484,10 @@ export default function (request) {
480
484
  return event.data?.status === 'otp-verifying'
481
485
  },
482
486
  isNotWithdrawMinDepositAmount: (context, event) => {
483
- const { withdrawCheck } = context
484
- return !withdrawCheck?.passDepositeLimit
487
+ return !event.data?.passDepositeLimit
485
488
  },
486
489
  isPassWithdrawCooldownTime: (context, event) => {
487
- const { withdrawCheck } = context
488
- return !withdrawCheck?.passWithdrawCooldownTime
489
- },
490
- isNotWIthdrawServiceTime: (context, event) => {
491
- const { withdrawCheck } = context
492
- return !withdrawCheck?.withdrawInServiceTime
490
+ return !event.data?.passWithdrawCooldownTime
493
491
  },
494
492
  },
495
493
  services: {
@@ -3,20 +3,7 @@ import urljoin from 'url-join'
3
3
  // const urljoin = require('url-join')
4
4
 
5
5
  export default class Config {
6
- constructor({
7
- apiURL,
8
- apiVersion,
9
- clientId,
10
- appSecret,
11
- platform,
12
- version,
13
- fpToken,
14
- sentry,
15
- defaultChannel,
16
- defaultSubchannel,
17
- socketURL,
18
- bucketName,
19
- }) {
6
+ constructor({ apiURL, apiVersion, clientId, appSecret, platform, version, fpToken, sentry, defaultChannel, defaultSubchannel }) {
20
7
  this.apiURL = apiURL
21
8
  this.apiVersion = apiVersion
22
9
  this.clientId = clientId
@@ -28,8 +15,6 @@ export default class Config {
28
15
  this.sentry = sentry
29
16
  this.defaultChannel = defaultChannel
30
17
  this.defaultSubchannel = defaultSubchannel
31
- this.socketURL = socketURL
32
- this.bucketName = bucketName
33
18
  }
34
19
 
35
20
  setApiURL(url) {
@@ -1,5 +1,5 @@
1
1
  import uniqBy from 'lodash/uniqBy'
2
- import { load, defaultEndpoint } from '../lib/fingerprint_v3_11_5.js'
2
+ import { load, defaultEndpoint } from '../lib/fingerprint_v3_11_2.js'
3
3
 
4
4
  const reg = /fnapi\d*/
5
5
 
@@ -1,46 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import game from '../api/game.js'
3
-
4
- export default function (request, context) {
5
- // const { appSecret } = request.config
6
- const { providerId, seqNo, lang } = context
7
- return createMachine(
8
- {
9
- id: 'game_replay',
10
- initial: 'fetching',
11
- context: {
12
- gameReplayInfo: {},
13
- },
14
- states: {
15
- fetching: {
16
- invoke: {
17
- src: 'fetchGameReplayInfo',
18
- onDone: {
19
- target: 'idle',
20
- actions: 'setGameReplayInfo',
21
- },
22
- onError: {
23
- target: 'idle',
24
- },
25
- },
26
- },
27
- idle: {},
28
- },
29
- },
30
- {
31
- actions: {
32
- setGameReplayInfo: assign((context, event) => {
33
- return {
34
- gameReplayInfo: event.data.data,
35
- }
36
- }),
37
- },
38
- services: {
39
- // 取得遊戲重播資訊
40
- fetchGameReplayInfo: async (context, event) => {
41
- return await request.send(game.getGameReplayInfo({ providerId, seqNo, lang }))
42
- },
43
- },
44
- }
45
- )
46
- }