@jetthai/cuora 1.1.98 → 1.1.100
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.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/machine/deposit/manual_cash.js +11 -39
- package/src/machine/game_favorite_v2.js +34 -1
- package/src/machine/index.js +1 -12
- package/src/machine/reward_cash.js +4 -5
- package/src/machine/withdraw/index.js +14 -1
- package/src/machine/{withdraw_amb.js → withdraw/withdraw_amb.js} +3 -3
- package/src/machine/{withdraw_crypto.js → withdraw/withdraw_crypto.js} +4 -4
- package/src/machine/{withdraw_fc.js → withdraw/withdraw_fc.js} +1 -1
- package/src/machine/{withdraw_vn.js → withdraw/withdraw_vn.js} +3 -3
- package/src/machine/{withdraw_vn2.js → withdraw/withdraw_vn2.js} +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.100](https://github.com/jetthai/cuora-module/compare/v1.1.99...v1.1.100) (2023-05-22)
|
|
6
|
+
|
|
7
|
+
### [1.1.99](https://github.com/jetthai/cuora-module/compare/v1.1.97...v1.1.99) (2023-05-22)
|
|
8
|
+
|
|
5
9
|
### [1.1.98](https://github.com/jetthai/cuora-module/compare/v1.1.97...v1.1.98) (2023-05-18)
|
|
6
10
|
|
|
7
11
|
### [1.1.97](https://github.com/jetthai/cuora-module/compare/v1.1.96...v1.1.97) (2023-05-16)
|
package/package.json
CHANGED
|
@@ -55,38 +55,11 @@ export default function (request, context) {
|
|
|
55
55
|
},
|
|
56
56
|
],
|
|
57
57
|
},
|
|
58
|
-
loaded: {
|
|
59
|
-
on: {
|
|
60
|
-
SET_PROMOTION: {
|
|
61
|
-
target: 'debouncing',
|
|
62
|
-
actions: 'setPromotion',
|
|
63
|
-
},
|
|
64
|
-
SELECT_HOUSE_BANK: {
|
|
65
|
-
actions: 'setHouseBank',
|
|
66
|
-
},
|
|
67
|
-
INPUT_AMOUNT: {
|
|
68
|
-
target: 'debouncing',
|
|
69
|
-
actions: 'inputAmount',
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
58
|
+
loaded: {},
|
|
73
59
|
debouncing: {
|
|
74
60
|
after: {
|
|
75
61
|
1000: [{ target: 'calculating', cond: 'isCalculable' }, { target: 'loaded' }],
|
|
76
62
|
},
|
|
77
|
-
on: {
|
|
78
|
-
SET_PROMOTION: {
|
|
79
|
-
target: 'debouncing',
|
|
80
|
-
actions: 'setPromotion',
|
|
81
|
-
},
|
|
82
|
-
SELECT_HOUSE_BANK: {
|
|
83
|
-
actions: 'setHouseBank',
|
|
84
|
-
},
|
|
85
|
-
INPUT_AMOUNT: {
|
|
86
|
-
target: 'debouncing',
|
|
87
|
-
actions: 'inputAmount',
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
63
|
},
|
|
91
64
|
calculating: {
|
|
92
65
|
invoke: {
|
|
@@ -102,17 +75,6 @@ export default function (request, context) {
|
|
|
102
75
|
},
|
|
103
76
|
calculated: {
|
|
104
77
|
on: {
|
|
105
|
-
SET_PROMOTION: {
|
|
106
|
-
target: 'debouncing',
|
|
107
|
-
actions: 'setPromotion',
|
|
108
|
-
},
|
|
109
|
-
SELECT_HOUSE_BANK: {
|
|
110
|
-
actions: 'setHouseBank',
|
|
111
|
-
},
|
|
112
|
-
INPUT_AMOUNT: {
|
|
113
|
-
target: 'debouncing',
|
|
114
|
-
actions: 'inputAmount',
|
|
115
|
-
},
|
|
116
78
|
SELECT_USER_BANK: {
|
|
117
79
|
actions: 'setUserBank',
|
|
118
80
|
},
|
|
@@ -150,7 +112,17 @@ export default function (request, context) {
|
|
|
150
112
|
},
|
|
151
113
|
on: {
|
|
152
114
|
SET_PROMOTION: {
|
|
115
|
+
target: 'debouncing',
|
|
153
116
|
actions: 'setPromotion',
|
|
117
|
+
internal: false,
|
|
118
|
+
},
|
|
119
|
+
INPUT_AMOUNT: {
|
|
120
|
+
target: 'debouncing',
|
|
121
|
+
actions: 'inputAmount',
|
|
122
|
+
internal: false,
|
|
123
|
+
},
|
|
124
|
+
SELECT_HOUSE_BANK: {
|
|
125
|
+
actions: 'setHouseBank',
|
|
154
126
|
},
|
|
155
127
|
},
|
|
156
128
|
},
|
|
@@ -7,9 +7,23 @@ export default function (request) {
|
|
|
7
7
|
id: 'favorite',
|
|
8
8
|
initial: 'fetching',
|
|
9
9
|
context: {
|
|
10
|
+
auth: false,
|
|
10
11
|
list: [],
|
|
11
12
|
},
|
|
12
13
|
states: {
|
|
14
|
+
idle: {},
|
|
15
|
+
checking: {
|
|
16
|
+
always: [
|
|
17
|
+
{
|
|
18
|
+
target: 'fetching',
|
|
19
|
+
cond: 'hasAuth',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
target: 'idle',
|
|
23
|
+
actions: 'clearList',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
13
27
|
fetching: {
|
|
14
28
|
invoke: {
|
|
15
29
|
src: 'fetchList',
|
|
@@ -17,7 +31,7 @@ export default function (request) {
|
|
|
17
31
|
actions: 'setList',
|
|
18
32
|
},
|
|
19
33
|
onError: {
|
|
20
|
-
actions:
|
|
34
|
+
actions: 'clearList',
|
|
21
35
|
},
|
|
22
36
|
},
|
|
23
37
|
},
|
|
@@ -68,6 +82,13 @@ export default function (request) {
|
|
|
68
82
|
actions: 'removeFromList',
|
|
69
83
|
cond: 'isExist',
|
|
70
84
|
},
|
|
85
|
+
SET_AUTH: [
|
|
86
|
+
{
|
|
87
|
+
target: 'checking',
|
|
88
|
+
actions: 'setAuth',
|
|
89
|
+
cond: 'isAuthChanged',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
71
92
|
},
|
|
72
93
|
},
|
|
73
94
|
{
|
|
@@ -77,6 +98,11 @@ export default function (request) {
|
|
|
77
98
|
list: event.data,
|
|
78
99
|
}
|
|
79
100
|
}),
|
|
101
|
+
clearList: assign((context, event) => {
|
|
102
|
+
return {
|
|
103
|
+
list: [],
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
80
106
|
addToList: assign((context, event) => {
|
|
81
107
|
return {
|
|
82
108
|
list: [...context.list, event.data],
|
|
@@ -87,10 +113,17 @@ export default function (request) {
|
|
|
87
113
|
list: context.list.filter((item) => item.gameCode !== event.data.gameCode),
|
|
88
114
|
}
|
|
89
115
|
}),
|
|
116
|
+
setAuth: assign((context, event) => {
|
|
117
|
+
return {
|
|
118
|
+
auth: !!event.data,
|
|
119
|
+
}
|
|
120
|
+
}),
|
|
90
121
|
},
|
|
91
122
|
guards: {
|
|
92
123
|
isExist: (context, event) => context.list.some((item) => item.gameCode === event.data.gameCode),
|
|
93
124
|
isNotExist: (context, event) => !context.list.some((item) => item.gameCode === event.data.gameCode),
|
|
125
|
+
isAuthChanged: (context, event) => context.auth !== !!event.data,
|
|
126
|
+
hasAuth: (context, event) => context.auth,
|
|
94
127
|
},
|
|
95
128
|
services: {
|
|
96
129
|
add: async (context, event) => {
|
package/src/machine/index.js
CHANGED
|
@@ -23,11 +23,6 @@ import user_sign_up from './user_sign_up.js'
|
|
|
23
23
|
import user_reset_password from './user_reset_password.js'
|
|
24
24
|
import bank_binding from './bank_binding.js'
|
|
25
25
|
import bank_binding_amb from './bank_binding_amb.js'
|
|
26
|
-
import withdraw_fc from './withdraw_fc.js'
|
|
27
|
-
import withdraw_vn from './withdraw_vn.js'
|
|
28
|
-
import withdraw_vn2 from './withdraw_vn2.js'
|
|
29
|
-
import withdraw_crypto from './withdraw_crypto.js'
|
|
30
|
-
import withdraw_amb from './withdraw_amb.js'
|
|
31
26
|
import withdraw from './withdraw/index.js'
|
|
32
27
|
import deposit from './deposit/index.js'
|
|
33
28
|
import bonus from './bonus.js'
|
|
@@ -43,7 +38,6 @@ export default {
|
|
|
43
38
|
auth,
|
|
44
39
|
welcome,
|
|
45
40
|
common,
|
|
46
|
-
deposit,
|
|
47
41
|
error,
|
|
48
42
|
game_favorite_v2,
|
|
49
43
|
game_search,
|
|
@@ -65,11 +59,6 @@ export default {
|
|
|
65
59
|
user_reset_password,
|
|
66
60
|
bank_binding,
|
|
67
61
|
bank_binding_amb,
|
|
68
|
-
withdraw_fc,
|
|
69
|
-
withdraw_vn,
|
|
70
|
-
withdraw_vn2,
|
|
71
|
-
withdraw_crypto,
|
|
72
|
-
withdraw_amb,
|
|
73
62
|
...deposit,
|
|
74
63
|
bonus,
|
|
75
64
|
leaderboard,
|
|
@@ -78,5 +67,5 @@ export default {
|
|
|
78
67
|
vip_table,
|
|
79
68
|
promotions,
|
|
80
69
|
roulette_v2,
|
|
81
|
-
withdraw,
|
|
70
|
+
...withdraw,
|
|
82
71
|
}
|
|
@@ -9,7 +9,7 @@ export default function (request) {
|
|
|
9
9
|
id: 'reward_cash',
|
|
10
10
|
type: 'parallel',
|
|
11
11
|
context: {
|
|
12
|
-
|
|
12
|
+
auth: false,
|
|
13
13
|
otherRewardList: [],
|
|
14
14
|
pointsRewardList: [],
|
|
15
15
|
rewardList: [],
|
|
@@ -27,7 +27,7 @@ export default function (request) {
|
|
|
27
27
|
{
|
|
28
28
|
target: 'loading',
|
|
29
29
|
cond: (context, event) => {
|
|
30
|
-
return context.
|
|
30
|
+
return context.auth
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
],
|
|
@@ -137,8 +137,7 @@ export default function (request) {
|
|
|
137
137
|
target: '.timer.checking',
|
|
138
138
|
actions: 'setAuth',
|
|
139
139
|
cond: (context, event) => {
|
|
140
|
-
|
|
141
|
-
return context.hasAuth !== event.data
|
|
140
|
+
return context.auth !== !!event.data
|
|
142
141
|
},
|
|
143
142
|
},
|
|
144
143
|
},
|
|
@@ -146,7 +145,7 @@ export default function (request) {
|
|
|
146
145
|
{
|
|
147
146
|
actions: {
|
|
148
147
|
setAuth: assign((context, event) => {
|
|
149
|
-
return {
|
|
148
|
+
return { auth: !!event.data }
|
|
150
149
|
}),
|
|
151
150
|
setRewardList: assign((context, event) => {
|
|
152
151
|
return {
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
+
import withdraw_fc from './withdraw_fc.js'
|
|
2
|
+
import withdraw_vn from './withdraw_vn.js'
|
|
3
|
+
import withdraw_vn2 from './withdraw_vn2.js'
|
|
4
|
+
import withdraw_crypto from './withdraw_crypto.js'
|
|
5
|
+
import withdraw_amb from './withdraw_amb.js'
|
|
1
6
|
import crypto_cash from './crypto_cash.js'
|
|
2
7
|
import manual_cash from './manual_cash.js'
|
|
3
8
|
|
|
4
|
-
export default {
|
|
9
|
+
export default {
|
|
10
|
+
withdraw_fc,
|
|
11
|
+
withdraw_vn,
|
|
12
|
+
withdraw_vn2,
|
|
13
|
+
withdraw_crypto,
|
|
14
|
+
withdraw_amb,
|
|
15
|
+
crypto_cash,
|
|
16
|
+
manual_cash,
|
|
17
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import findLastIndex from 'lodash/findLastIndex.js'
|
|
3
|
-
import payment from '
|
|
4
|
-
import common from '
|
|
5
|
-
import user from '
|
|
3
|
+
import payment from '../../api/payment.js'
|
|
4
|
+
import common from '../../api/common.js'
|
|
5
|
+
import user from '../../api/user.js'
|
|
6
6
|
|
|
7
7
|
export default function (request) {
|
|
8
8
|
const { appSecret } = request.config
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import findLastIndex from 'lodash/findLastIndex.js'
|
|
3
|
-
import payment from '
|
|
4
|
-
import common from '
|
|
5
|
-
import user from '
|
|
6
|
-
import api from '
|
|
3
|
+
import payment from '../../api/payment.js'
|
|
4
|
+
import common from '../../api/common.js'
|
|
5
|
+
import user from '../../api/user.js'
|
|
6
|
+
import api from '../../api/payment.js'
|
|
7
7
|
|
|
8
8
|
export default function (request) {
|
|
9
9
|
const { appSecret } = request.config
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import findLastIndex from 'lodash/findLastIndex.js'
|
|
3
|
-
import payment from '
|
|
4
|
-
import common from '
|
|
5
|
-
import user from '
|
|
3
|
+
import payment from '../../api/payment.js'
|
|
4
|
+
import common from '../../api/common.js'
|
|
5
|
+
import user from '../../api/user.js'
|
|
6
6
|
|
|
7
7
|
export default function (request) {
|
|
8
8
|
const { appSecret } = request.config
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import findLastIndex from 'lodash/findLastIndex.js'
|
|
3
|
-
import payment from '
|
|
4
|
-
import user from '
|
|
3
|
+
import payment from '../../api/payment.js'
|
|
4
|
+
import user from '../../api/user.js'
|
|
5
5
|
|
|
6
6
|
export default function (request) {
|
|
7
7
|
const { appSecret } = request.config
|