@jetthai/cuora 1.1.346-wallet-1 → 1.1.347
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 +0 -14
- package/package.json +1 -1
- package/resetGitBranch.sh +0 -49
- package/src/machine/activity/activity.js +2 -1
- package/src/machine/deposit/direct.js +6 -2
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +51 -10
- package/src/machine/deposit/manual_vn.js +23 -3
- package/src/machine/deposit/qrcode_v2.js +132 -6
- package/src/machine/deposit/virtual_bank_vn.js +31 -3
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/game_search_cash.js +2 -10
- package/src/machine/game_search_v2.js +2 -10
- package/src/machine/game_v2_1.js +6 -17
- package/src/machine/promotions.js +5 -4
- package/src/machine/withdraw/withdraw_crypto.js +3 -1
- package/src/machine/withdraw/withdraw_crypto2.js +1 -1
- package/src/machine/withdraw/withdraw_manual.js +2 -1
- package/src/machine/withdraw/withdraw_vn.js +3 -1
- package/src/machine/withdraw/withdraw_vn2.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,20 +2,6 @@
|
|
|
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.346-wallet-1](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.346-wallet-1) (2025-04-10)
|
|
6
|
-
|
|
7
|
-
### [1.1.353](https://github.com/jetthai/cuora-module/compare/v1.1.352...v1.1.353) (2025-04-02)
|
|
8
|
-
|
|
9
|
-
### [1.1.352](https://github.com/jetthai/cuora-module/compare/v1.1.351...v1.1.352) (2025-04-02)
|
|
10
|
-
|
|
11
|
-
### [1.1.351](https://github.com/jetthai/cuora-module/compare/v1.1.350...v1.1.351) (2025-04-02)
|
|
12
|
-
|
|
13
|
-
### [1.1.350](https://github.com/jetthai/cuora-module/compare/v1.1.349...v1.1.350) (2025-03-31)
|
|
14
|
-
|
|
15
|
-
### [1.1.349](https://github.com/jetthai/cuora-module/compare/v1.1.348...v1.1.349) (2025-03-30)
|
|
16
|
-
|
|
17
|
-
### [1.1.348](https://github.com/jetthai/cuora-module/compare/v1.1.347...v1.1.348) (2025-03-30)
|
|
18
|
-
|
|
19
5
|
### [1.1.347](https://github.com/jetthai/cuora-module/compare/v1.1.346...v1.1.347) (2025-03-30)
|
|
20
6
|
|
|
21
7
|
### [1.1.346](https://github.com/jetthai/cuora-module/compare/v1.1.345...v1.1.346) (2025-03-27)
|
package/package.json
CHANGED
package/resetGitBranch.sh
CHANGED
|
@@ -59,53 +59,4 @@ git branch --set-upstream-to=origin/dev dev
|
|
|
59
59
|
if [ $? -ne 0 ]; then
|
|
60
60
|
echo "設定 dev 分支的上游分支為 origin/dev 失敗"
|
|
61
61
|
exit 1
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
# 切換到 master 分支
|
|
65
|
-
git checkout master
|
|
66
|
-
if [ $? -ne 0 ]; then
|
|
67
|
-
echo "切換到 master 分支失敗"
|
|
68
|
-
exit 1
|
|
69
|
-
fi
|
|
70
|
-
|
|
71
|
-
# 刪除本地的 qa 分支
|
|
72
|
-
git branch -D qa
|
|
73
|
-
if [ $? -ne 0 ]; then
|
|
74
|
-
echo "刪除本地 qa 分支失敗"
|
|
75
|
-
exit 1
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
# 刪除遠端的 qa 分支
|
|
79
|
-
git push origin --delete qa
|
|
80
|
-
if [ $? -ne 0 ]; then
|
|
81
|
-
echo "刪除遠端 qa 分支失敗"
|
|
82
|
-
exit 1
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# 建立並切換到新的 qa 分支
|
|
86
|
-
git checkout -b qa
|
|
87
|
-
if [ $? -ne 0 ]; then
|
|
88
|
-
echo "建立並切換到新的 qa 分支失敗"
|
|
89
|
-
exit 1
|
|
90
|
-
fi
|
|
91
|
-
|
|
92
|
-
# 強制推送新的 qa 分支到遠端
|
|
93
|
-
git push -f origin qa
|
|
94
|
-
if [ $? -ne 0 ]; then
|
|
95
|
-
echo "強制推送新的 qa 分支到遠端失敗"
|
|
96
|
-
exit 1
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
# 設定 qa 分支的上游分支為 origin/qa
|
|
100
|
-
git branch --set-upstream-to=origin/qa qa
|
|
101
|
-
if [ $? -ne 0 ]; then
|
|
102
|
-
echo "設定 qa 分支的上游分支為 origin/qa 失敗"
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
# 切換到 master 分支
|
|
107
|
-
git checkout master
|
|
108
|
-
if [ $? -ne 0 ]; then
|
|
109
|
-
echo "切換到 master 分支失敗"
|
|
110
|
-
exit 1
|
|
111
62
|
fi
|
|
@@ -186,7 +186,8 @@ export default function (request) {
|
|
|
186
186
|
services: {
|
|
187
187
|
fetchList: async (context, event) => {
|
|
188
188
|
const hasToken = request.getToken()
|
|
189
|
-
const
|
|
189
|
+
const isDoubleWallet = context.siteConfig?.walletMode === '4'
|
|
190
|
+
const apiCallable = hasToken && isDoubleWallet
|
|
190
191
|
const [{ data }, promotionList] = await Promise.all([
|
|
191
192
|
hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
|
|
192
193
|
apiCallable && !context.isPlaying ? request.send(payment.getPromotionsList()) : [],
|
|
@@ -58,6 +58,7 @@ export default function (request) {
|
|
|
58
58
|
always: [
|
|
59
59
|
{
|
|
60
60
|
target: 'loaded',
|
|
61
|
+
cond: 'isDoubleWalletMode',
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
target: 'calculating',
|
|
@@ -90,7 +91,7 @@ export default function (request) {
|
|
|
90
91
|
SUBMIT: [
|
|
91
92
|
{
|
|
92
93
|
target: 'pending',
|
|
93
|
-
cond: (context, event) => !!context.calculation,
|
|
94
|
+
cond: (context, event) => context.siteConfig?.walletMode === '4' && !!context.calculation,
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
97
|
target: 'submitting',
|
|
@@ -128,7 +129,7 @@ export default function (request) {
|
|
|
128
129
|
SUBMIT: [
|
|
129
130
|
{
|
|
130
131
|
target: 'pending',
|
|
131
|
-
cond: (context, event) => !!context.calculation,
|
|
132
|
+
cond: (context, event) => context.siteConfig?.walletMode === '4' && !!context.calculation,
|
|
132
133
|
},
|
|
133
134
|
{
|
|
134
135
|
target: 'submitting',
|
|
@@ -246,6 +247,9 @@ export default function (request) {
|
|
|
246
247
|
}),
|
|
247
248
|
},
|
|
248
249
|
guards: {
|
|
250
|
+
isDoubleWalletMode: (context, event) => {
|
|
251
|
+
return context.siteConfig?.walletMode === '4'
|
|
252
|
+
},
|
|
249
253
|
isCalculable: (context, event) => {
|
|
250
254
|
const {
|
|
251
255
|
amount,
|
|
@@ -72,8 +72,8 @@ export default function (request) {
|
|
|
72
72
|
target: 'fetching',
|
|
73
73
|
cond: (context, event) => {
|
|
74
74
|
const { siteConfig = {}, promotion = {} } = context
|
|
75
|
-
const { bonusPreviewEnable } = siteConfig
|
|
76
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
75
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
76
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
{ target: 'loaded' },
|
|
@@ -49,8 +49,8 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedCard } = context
|
|
52
|
-
const { bonusPreviewEnable } = siteConfig
|
|
53
|
-
return !!selectedCard && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedCard && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
{ target: 'loaded' },
|
|
@@ -78,8 +78,8 @@ export default function (request) {
|
|
|
78
78
|
actions: 'setCard',
|
|
79
79
|
cond: (context, event) => {
|
|
80
80
|
const { siteConfig = {}, promotion = {} } = context
|
|
81
|
-
const { bonusPreviewEnable } = siteConfig
|
|
82
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
81
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
82
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -87,6 +87,11 @@ export default function (request) {
|
|
|
87
87
|
},
|
|
88
88
|
],
|
|
89
89
|
SELECT_AMOUNT: [
|
|
90
|
+
{
|
|
91
|
+
target: 'pending',
|
|
92
|
+
actions: 'setAmount',
|
|
93
|
+
cond: 'isFreeWalletMode',
|
|
94
|
+
},
|
|
90
95
|
{
|
|
91
96
|
target: 'debouncing',
|
|
92
97
|
actions: 'setAmount',
|
|
@@ -94,6 +99,19 @@ export default function (request) {
|
|
|
94
99
|
],
|
|
95
100
|
},
|
|
96
101
|
},
|
|
102
|
+
pending: {
|
|
103
|
+
on: {
|
|
104
|
+
SELECT_AMOUNT: {
|
|
105
|
+
actions: 'setAmount',
|
|
106
|
+
},
|
|
107
|
+
CONFIRM: {
|
|
108
|
+
target: 'debouncing',
|
|
109
|
+
},
|
|
110
|
+
BACK: {
|
|
111
|
+
target: 'loaded',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
97
115
|
debouncing: {
|
|
98
116
|
on: {
|
|
99
117
|
SELECT_AMOUNT: {
|
|
@@ -114,6 +132,19 @@ export default function (request) {
|
|
|
114
132
|
invoke: {
|
|
115
133
|
src: 'fetchCalculation',
|
|
116
134
|
onDone: [
|
|
135
|
+
{
|
|
136
|
+
target: 'submitting',
|
|
137
|
+
actions: 'setCalculation',
|
|
138
|
+
cond: (context, event) => {
|
|
139
|
+
const { siteConfig = {}, selectedCard = {} } = context
|
|
140
|
+
return siteConfig.walletMode === '2' && selectedCard.jumpLinkEnable === 1
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
target: 'cardInfo',
|
|
145
|
+
actions: 'setCalculation',
|
|
146
|
+
cond: 'isFreeWalletMode',
|
|
147
|
+
},
|
|
117
148
|
{
|
|
118
149
|
target: 'calculated',
|
|
119
150
|
actions: 'setCalculation',
|
|
@@ -127,10 +158,17 @@ export default function (request) {
|
|
|
127
158
|
calculable: {
|
|
128
159
|
entry: 'clearCalculation',
|
|
129
160
|
on: {
|
|
130
|
-
SELECT_AMOUNT:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
161
|
+
SELECT_AMOUNT: [
|
|
162
|
+
{
|
|
163
|
+
target: 'pending',
|
|
164
|
+
actions: 'setAmount',
|
|
165
|
+
cond: 'isFreeWalletMode',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
target: 'debouncing',
|
|
169
|
+
actions: 'setAmount',
|
|
170
|
+
},
|
|
171
|
+
],
|
|
134
172
|
BACK: {
|
|
135
173
|
target: 'loaded',
|
|
136
174
|
},
|
|
@@ -178,8 +216,8 @@ export default function (request) {
|
|
|
178
216
|
actions: 'setCard',
|
|
179
217
|
cond: (context, event) => {
|
|
180
218
|
const { siteConfig = {}, promotion = {} } = context
|
|
181
|
-
const { bonusPreviewEnable } = siteConfig
|
|
182
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
219
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
220
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
183
221
|
},
|
|
184
222
|
},
|
|
185
223
|
{
|
|
@@ -287,6 +325,9 @@ export default function (request) {
|
|
|
287
325
|
}),
|
|
288
326
|
},
|
|
289
327
|
guards: {
|
|
328
|
+
isFreeWalletMode: (context, event) => {
|
|
329
|
+
return context.siteConfig?.walletMode === '2'
|
|
330
|
+
},
|
|
290
331
|
isSubmittable: (context, event) => {
|
|
291
332
|
const { cardNumber, serialNumber } = context
|
|
292
333
|
return cardNumber && serialNumber
|
|
@@ -75,8 +75,24 @@ export default function (request) {
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
step1: {
|
|
78
|
-
initial: '
|
|
78
|
+
initial: 'promotion',
|
|
79
79
|
states: {
|
|
80
|
+
promotion: {
|
|
81
|
+
always: [
|
|
82
|
+
{
|
|
83
|
+
target: 'idle',
|
|
84
|
+
cond: 'isDoubleWalletMode',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
target: 'calculating',
|
|
88
|
+
actions: 'setPromotionDefaultAmount',
|
|
89
|
+
cond: 'hasMinPromotionDeposit',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
target: 'idle',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
80
96
|
idle: {},
|
|
81
97
|
calculating: {
|
|
82
98
|
invoke: {
|
|
@@ -121,10 +137,11 @@ export default function (request) {
|
|
|
121
137
|
{
|
|
122
138
|
target: 'pending',
|
|
123
139
|
cond: (context, event) => {
|
|
124
|
-
const { calculation, promotion } = context
|
|
140
|
+
const { siteConfig = {}, calculation, promotion } = context
|
|
141
|
+
const { walletMode } = siteConfig
|
|
125
142
|
const { promotionsNo, activityNo } = promotion
|
|
126
143
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
127
|
-
return !!calculation && !isNoBonus
|
|
144
|
+
return walletMode === '4' && !!calculation && !isNoBonus
|
|
128
145
|
},
|
|
129
146
|
},
|
|
130
147
|
{
|
|
@@ -368,6 +385,9 @@ export default function (request) {
|
|
|
368
385
|
}),
|
|
369
386
|
},
|
|
370
387
|
guards: {
|
|
388
|
+
isDoubleWalletMode: (context, event) => {
|
|
389
|
+
return context.siteConfig?.walletMode === '4'
|
|
390
|
+
},
|
|
371
391
|
isCalculable: (context, event) => {
|
|
372
392
|
const {
|
|
373
393
|
amount,
|
|
@@ -49,8 +49,16 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedQrcode } = context
|
|
52
|
-
const { bonusPreviewEnable } = siteConfig
|
|
53
|
-
return !!selectedQrcode && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
target: 'debouncing',
|
|
58
|
+
actions: 'setPromotionDefaultAmount',
|
|
59
|
+
cond: (context, event) => {
|
|
60
|
+
const { siteConfig = {}, promotion = {} } = context
|
|
61
|
+
return siteConfig.walletMode === '3' && !!promotion?.minimumAmount
|
|
54
62
|
},
|
|
55
63
|
},
|
|
56
64
|
{ target: 'loaded' },
|
|
@@ -78,21 +86,51 @@ export default function (request) {
|
|
|
78
86
|
actions: 'setQrcode',
|
|
79
87
|
cond: (context, event) => {
|
|
80
88
|
const { siteConfig = {}, promotion = {} } = context
|
|
81
|
-
const { bonusPreviewEnable } = siteConfig
|
|
82
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
89
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
90
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
83
91
|
},
|
|
84
92
|
},
|
|
93
|
+
{
|
|
94
|
+
target: 'debouncing',
|
|
95
|
+
actions: ['setQrcode', 'setPromotionDefaultAmount'],
|
|
96
|
+
cond: (context, event) => context.siteConfig?.walletMode === '3' && context.promotion?.minimumAmount,
|
|
97
|
+
},
|
|
85
98
|
{
|
|
86
99
|
actions: 'setQrcode',
|
|
87
100
|
},
|
|
88
101
|
],
|
|
89
102
|
SELECT_AMOUNT: [
|
|
103
|
+
{
|
|
104
|
+
target: 'debouncing',
|
|
105
|
+
actions: 'setAmount',
|
|
106
|
+
cond: 'isDoubleWalletMode',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
target: 'pending',
|
|
110
|
+
actions: 'addAmount',
|
|
111
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
target: 'pending',
|
|
115
|
+
actions: 'setAmount',
|
|
116
|
+
cond: 'isFreeWalletMode',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
target: 'debouncing',
|
|
120
|
+
actions: 'addAmount',
|
|
121
|
+
cond: 'isGrandTotalEnable',
|
|
122
|
+
},
|
|
90
123
|
{
|
|
91
124
|
target: 'debouncing',
|
|
92
125
|
actions: 'setAmount',
|
|
93
126
|
},
|
|
94
127
|
],
|
|
95
128
|
KEY_IN: [
|
|
129
|
+
{
|
|
130
|
+
target: 'pending',
|
|
131
|
+
actions: 'setAmount',
|
|
132
|
+
cond: 'isFreeWalletMode',
|
|
133
|
+
},
|
|
96
134
|
{
|
|
97
135
|
target: 'calculating',
|
|
98
136
|
actions: 'setAmount',
|
|
@@ -100,9 +138,51 @@ export default function (request) {
|
|
|
100
138
|
],
|
|
101
139
|
},
|
|
102
140
|
},
|
|
141
|
+
pending: {
|
|
142
|
+
on: {
|
|
143
|
+
SELECT_AMOUNT: [
|
|
144
|
+
{
|
|
145
|
+
actions: 'addAmount',
|
|
146
|
+
cond: 'isGrandTotalEnable',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
actions: 'setAmount',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
KEY_IN: {
|
|
153
|
+
actions: 'setAmount',
|
|
154
|
+
},
|
|
155
|
+
CONFIRM: {
|
|
156
|
+
target: 'calculating',
|
|
157
|
+
},
|
|
158
|
+
BACK: {
|
|
159
|
+
target: 'loaded',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
103
163
|
debouncing: {
|
|
104
164
|
on: {
|
|
105
165
|
SELECT_AMOUNT: [
|
|
166
|
+
{
|
|
167
|
+
target: 'debouncing',
|
|
168
|
+
actions: 'setAmount',
|
|
169
|
+
cond: 'isDoubleWalletMode',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
target: 'debouncing',
|
|
173
|
+
actions: 'addAmount',
|
|
174
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
target: 'debouncing',
|
|
178
|
+
actions: 'setAmount',
|
|
179
|
+
cond: 'isFreeWalletMode',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
target: 'debouncing',
|
|
183
|
+
actions: 'addAmount',
|
|
184
|
+
cond: 'isGrandTotalEnable',
|
|
185
|
+
},
|
|
106
186
|
{
|
|
107
187
|
target: 'debouncing',
|
|
108
188
|
actions: 'setAmount',
|
|
@@ -122,6 +202,26 @@ export default function (request) {
|
|
|
122
202
|
entry: 'clearCalculation',
|
|
123
203
|
on: {
|
|
124
204
|
SELECT_AMOUNT: [
|
|
205
|
+
{
|
|
206
|
+
target: 'debouncing',
|
|
207
|
+
actions: 'setAmount',
|
|
208
|
+
cond: 'isDoubleWalletMode',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
target: 'pending',
|
|
212
|
+
actions: 'addAmount',
|
|
213
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
target: 'pending',
|
|
217
|
+
actions: 'setAmount',
|
|
218
|
+
cond: 'isFreeWalletMode',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
target: 'debouncing',
|
|
222
|
+
actions: 'addAmount',
|
|
223
|
+
cond: 'isGrandTotalEnable',
|
|
224
|
+
},
|
|
125
225
|
{
|
|
126
226
|
target: 'debouncing',
|
|
127
227
|
actions: 'setAmount',
|
|
@@ -140,6 +240,11 @@ export default function (request) {
|
|
|
140
240
|
invoke: {
|
|
141
241
|
src: 'fetchCalculation',
|
|
142
242
|
onDone: [
|
|
243
|
+
{
|
|
244
|
+
target: 'submitting',
|
|
245
|
+
actions: 'setCalculation',
|
|
246
|
+
cond: 'isFreeWalletMode',
|
|
247
|
+
},
|
|
143
248
|
{
|
|
144
249
|
target: 'calculated',
|
|
145
250
|
actions: 'setCalculation',
|
|
@@ -153,6 +258,16 @@ export default function (request) {
|
|
|
153
258
|
calculated: {
|
|
154
259
|
on: {
|
|
155
260
|
SELECT_AMOUNT: [
|
|
261
|
+
{
|
|
262
|
+
target: 'pending',
|
|
263
|
+
actions: 'addAmount',
|
|
264
|
+
cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
target: 'pending',
|
|
268
|
+
actions: 'setAmount',
|
|
269
|
+
cond: 'isFreeWalletMode',
|
|
270
|
+
},
|
|
156
271
|
{
|
|
157
272
|
target: 'debouncing',
|
|
158
273
|
actions: 'addAmount',
|
|
@@ -199,8 +314,8 @@ export default function (request) {
|
|
|
199
314
|
actions: 'setQrcode',
|
|
200
315
|
cond: (context, event) => {
|
|
201
316
|
const { siteConfig = {}, promotion = {} } = context
|
|
202
|
-
const { bonusPreviewEnable } = siteConfig
|
|
203
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
317
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
318
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
204
319
|
},
|
|
205
320
|
},
|
|
206
321
|
{
|
|
@@ -280,8 +395,19 @@ export default function (request) {
|
|
|
280
395
|
promotion,
|
|
281
396
|
}
|
|
282
397
|
}),
|
|
398
|
+
setPromotionDefaultAmount: assign((context, event) => {
|
|
399
|
+
return {
|
|
400
|
+
selectedAmount: context.promotion.minimumAmount,
|
|
401
|
+
}
|
|
402
|
+
}),
|
|
283
403
|
},
|
|
284
404
|
guards: {
|
|
405
|
+
isDoubleWalletMode: (context, event) => {
|
|
406
|
+
return context.siteConfig?.walletMode === '4'
|
|
407
|
+
},
|
|
408
|
+
isFreeWalletMode: (context, event) => {
|
|
409
|
+
return context.siteConfig?.walletMode === '2'
|
|
410
|
+
},
|
|
285
411
|
isGrandTotalEnable: (context, event) => {
|
|
286
412
|
return context.grandTotalEnable === 1
|
|
287
413
|
},
|
|
@@ -45,8 +45,24 @@ export default function (request) {
|
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
step1: {
|
|
48
|
-
initial: '
|
|
48
|
+
initial: 'promotion',
|
|
49
49
|
states: {
|
|
50
|
+
promotion: {
|
|
51
|
+
always: [
|
|
52
|
+
{
|
|
53
|
+
target: 'idle',
|
|
54
|
+
cond: 'isDoubleWalletMode',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
target: 'calculating',
|
|
58
|
+
actions: 'setPromotionDefaultAmount',
|
|
59
|
+
cond: 'hasMinPromotionDeposit',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
target: 'idle',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
50
66
|
idle: {},
|
|
51
67
|
calculating: {
|
|
52
68
|
invoke: {
|
|
@@ -88,10 +104,11 @@ export default function (request) {
|
|
|
88
104
|
{
|
|
89
105
|
target: 'pending',
|
|
90
106
|
cond: (context, event) => {
|
|
91
|
-
const { calculation, promotion } = context
|
|
107
|
+
const { siteConfig = {}, calculation, promotion } = context
|
|
108
|
+
const { walletMode } = siteConfig
|
|
92
109
|
const { promotionsNo, activityNo } = promotion
|
|
93
110
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
94
|
-
return !!calculation && !isNoBonus
|
|
111
|
+
return walletMode === '4' && !!calculation && !isNoBonus
|
|
95
112
|
},
|
|
96
113
|
},
|
|
97
114
|
{
|
|
@@ -214,8 +231,16 @@ export default function (request) {
|
|
|
214
231
|
promotion: event.data,
|
|
215
232
|
}
|
|
216
233
|
}),
|
|
234
|
+
setPromotionDefaultAmount: assign((context, event) => {
|
|
235
|
+
return {
|
|
236
|
+
amount: context.promotion.minimumAmount,
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
217
239
|
},
|
|
218
240
|
guards: {
|
|
241
|
+
isDoubleWalletMode: (context, event) => {
|
|
242
|
+
return context.siteConfig?.walletMode === '4'
|
|
243
|
+
},
|
|
219
244
|
isCalculable: (context, event) => {
|
|
220
245
|
const {
|
|
221
246
|
amount,
|
|
@@ -229,6 +254,9 @@ export default function (request) {
|
|
|
229
254
|
isProcessing: (context, event) => {
|
|
230
255
|
return context.processing
|
|
231
256
|
},
|
|
257
|
+
hasMinPromotionDeposit: (context, event) => {
|
|
258
|
+
return context.promotion?.minimumAmount
|
|
259
|
+
},
|
|
232
260
|
},
|
|
233
261
|
services: {
|
|
234
262
|
fetchPaymentDetail: async (context, event) => {
|
|
@@ -74,8 +74,8 @@ export default function (request) {
|
|
|
74
74
|
target: 'fetching',
|
|
75
75
|
cond: (context, event) => {
|
|
76
76
|
const { siteConfig = {}, promotion = {} } = context
|
|
77
|
-
const { bonusPreviewEnable } = siteConfig
|
|
78
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
77
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
78
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
{ target: 'loaded' },
|
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'game_search_cash',
|
|
8
|
-
initial: '
|
|
8
|
+
initial: 'preset',
|
|
9
9
|
context: {
|
|
10
10
|
initialized: false,
|
|
11
11
|
keyword: '',
|
|
@@ -20,7 +20,7 @@ export default function (request) {
|
|
|
20
20
|
clickDefault: null,
|
|
21
21
|
traceId: null,
|
|
22
22
|
gameCode: null,
|
|
23
|
-
lang: '
|
|
23
|
+
lang: 'en_US',
|
|
24
24
|
|
|
25
25
|
// v2
|
|
26
26
|
recentlySearch: [],
|
|
@@ -32,14 +32,6 @@ export default function (request) {
|
|
|
32
32
|
isRecentlySearch: null,
|
|
33
33
|
},
|
|
34
34
|
states: {
|
|
35
|
-
init: {
|
|
36
|
-
on: {
|
|
37
|
-
INIT: {
|
|
38
|
-
target: 'preset',
|
|
39
|
-
actions: ['setLang'],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
35
|
preset: {
|
|
44
36
|
exit: 'setInitialized',
|
|
45
37
|
invoke: {
|
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'game_search_v2',
|
|
8
|
-
initial: '
|
|
8
|
+
initial: 'preset',
|
|
9
9
|
context: {
|
|
10
10
|
keyword: '',
|
|
11
11
|
tagId: null,
|
|
@@ -25,17 +25,9 @@ export default function (request) {
|
|
|
25
25
|
isRecentlyGame: null,
|
|
26
26
|
isRecentlySearch: null,
|
|
27
27
|
gameCode: null,
|
|
28
|
-
lang: '
|
|
28
|
+
lang: 'en_US',
|
|
29
29
|
},
|
|
30
30
|
states: {
|
|
31
|
-
init: {
|
|
32
|
-
on: {
|
|
33
|
-
INIT: {
|
|
34
|
-
target: 'preset',
|
|
35
|
-
actions: ['setLang'],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
31
|
preset: {
|
|
40
32
|
invoke: {
|
|
41
33
|
src: 'fetchTags',
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -40,7 +40,7 @@ export default function (request) {
|
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
walletMode: null,
|
|
44
44
|
lang: 'en_US',
|
|
45
45
|
isMobile: new UAParser().getResult().device.type,
|
|
46
46
|
gameURL: null,
|
|
@@ -81,7 +81,7 @@ export default function (request) {
|
|
|
81
81
|
},
|
|
82
82
|
ENTER_GAME: {
|
|
83
83
|
target: 'connecting',
|
|
84
|
-
actions: ['setGameInfo', 'setLang', '
|
|
84
|
+
actions: ['setGameInfo', 'setLang', 'setWalletMode'],
|
|
85
85
|
},
|
|
86
86
|
MENU_ENTER_GAME: {
|
|
87
87
|
target: 'connecting',
|
|
@@ -246,17 +246,6 @@ export default function (request) {
|
|
|
246
246
|
LEAVE_GAME_REFRESH: {
|
|
247
247
|
actions: 'setIsPlaying',
|
|
248
248
|
},
|
|
249
|
-
LOAD: {
|
|
250
|
-
target: 'routing',
|
|
251
|
-
actions: 'setLoadable',
|
|
252
|
-
},
|
|
253
|
-
SET_ROOM: {
|
|
254
|
-
cond: 'isDifferentRoom',
|
|
255
|
-
actions: ['setRoom', 'resetContent'],
|
|
256
|
-
},
|
|
257
|
-
SET_STATIC_DATA: {
|
|
258
|
-
actions: 'setStaticData',
|
|
259
|
-
},
|
|
260
249
|
},
|
|
261
250
|
},
|
|
262
251
|
},
|
|
@@ -418,8 +407,8 @@ export default function (request) {
|
|
|
418
407
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
419
408
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
420
409
|
}),
|
|
421
|
-
|
|
422
|
-
return {
|
|
410
|
+
setWalletMode: assign((context, event) => {
|
|
411
|
+
return { walletMode: event.data.walletMode }
|
|
423
412
|
}),
|
|
424
413
|
setLang: assign((context, event) => {
|
|
425
414
|
const lang = event.data.locale.replace('-', '_')
|
|
@@ -557,7 +546,7 @@ export default function (request) {
|
|
|
557
546
|
},
|
|
558
547
|
connectGame: async (context, event) => {
|
|
559
548
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
560
|
-
const { lang, isMobile,
|
|
549
|
+
const { lang, isMobile, walletMode } = context
|
|
561
550
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
562
551
|
const params = {
|
|
563
552
|
provider_id: providerId,
|
|
@@ -567,7 +556,7 @@ export default function (request) {
|
|
|
567
556
|
is_demo: false,
|
|
568
557
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
569
558
|
lang,
|
|
570
|
-
selected_wallet_type:
|
|
559
|
+
selected_wallet_type: walletMode,
|
|
571
560
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
572
561
|
}
|
|
573
562
|
const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
|
|
@@ -7,6 +7,7 @@ export default function (request) {
|
|
|
7
7
|
id: 'promotions',
|
|
8
8
|
initial: 'loading',
|
|
9
9
|
context: {
|
|
10
|
+
noBonus: {},
|
|
10
11
|
userInfo: {},
|
|
11
12
|
siteConfig: {},
|
|
12
13
|
withdrawRule: {},
|
|
@@ -86,10 +87,10 @@ export default function (request) {
|
|
|
86
87
|
actions: {
|
|
87
88
|
setPromotionsList: assign((context, event) => {
|
|
88
89
|
const promotionsList = JSON.parse(JSON.stringify(event.data))
|
|
89
|
-
const { userInfo, siteConfig } = context
|
|
90
|
+
const { noBonus, userInfo, siteConfig } = context
|
|
90
91
|
const { withdraw_rule, balance, bank_amount } = userInfo
|
|
91
|
-
const { currencyConversionLimit } = siteConfig
|
|
92
|
-
const balanceAvailable = parseFloat(bank_amount) < parseFloat(`${currencyConversionLimit}`)
|
|
92
|
+
const { currencyConversionLimit, walletMode } = siteConfig
|
|
93
|
+
const balanceAvailable = parseFloat(`${walletMode === '4' ? bank_amount : balance}`) < parseFloat(`${currencyConversionLimit}`)
|
|
93
94
|
const isFreeLimitRule = withdraw_rule.includes('FREE_LIMIT')
|
|
94
95
|
const includesDefaultRule = withdraw_rule === 'DEFAULT' || withdraw_rule.includes('FREE_DEFAULT')
|
|
95
96
|
|
|
@@ -111,7 +112,7 @@ export default function (request) {
|
|
|
111
112
|
}
|
|
112
113
|
return {
|
|
113
114
|
promotionsList,
|
|
114
|
-
selectedPromo: promotionsList[0],
|
|
115
|
+
selectedPromo: siteConfig?.walletMode === '4' ? promotionsList[0] : noBonus,
|
|
115
116
|
}
|
|
116
117
|
}),
|
|
117
118
|
setSelectedPromo: assign((context, event) => {
|
|
@@ -147,6 +147,7 @@ export default function (request) {
|
|
|
147
147
|
},
|
|
148
148
|
SET_ATTACHMENT_TYPE: {
|
|
149
149
|
actions: 'setAttachmentType',
|
|
150
|
+
cond: 'isNewWalletMode',
|
|
150
151
|
},
|
|
151
152
|
POOL: {
|
|
152
153
|
target: 'pooling',
|
|
@@ -322,7 +323,7 @@ export default function (request) {
|
|
|
322
323
|
balance,
|
|
323
324
|
siteConfig,
|
|
324
325
|
userInfo,
|
|
325
|
-
attachmentType: 'withdraw',
|
|
326
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
326
327
|
}
|
|
327
328
|
}),
|
|
328
329
|
updateWithdrawCondition: assign((context, event) => {
|
|
@@ -433,6 +434,7 @@ export default function (request) {
|
|
|
433
434
|
isOtpRequired: (context, event) => {
|
|
434
435
|
return event.data?.status === 'otp-verifying'
|
|
435
436
|
},
|
|
437
|
+
isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
|
|
436
438
|
},
|
|
437
439
|
services: {
|
|
438
440
|
fetchInitData: async (context, event) => {
|
|
@@ -355,7 +355,7 @@ export default function (request) {
|
|
|
355
355
|
const methods = siteConfig?.paymentMethods?.withdraw || []
|
|
356
356
|
return {
|
|
357
357
|
methods,
|
|
358
|
-
attachmentType: 'withdraw',
|
|
358
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
359
359
|
}
|
|
360
360
|
}),
|
|
361
361
|
setMode: assign((context, event) => {
|
|
@@ -397,8 +397,9 @@ export default function (request) {
|
|
|
397
397
|
return { bindingPaymentList, bindingPaymentInfo, boundBanks: combinedData, currentBank: combinedData[0] }
|
|
398
398
|
}),
|
|
399
399
|
preset: assign((context, event) => {
|
|
400
|
+
const { siteConfig } = context
|
|
400
401
|
return {
|
|
401
|
-
attachmentType: 'withdraw',
|
|
402
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
402
403
|
}
|
|
403
404
|
}),
|
|
404
405
|
setMode: assign((context, event) => {
|
|
@@ -193,6 +193,7 @@ export default function (request) {
|
|
|
193
193
|
},
|
|
194
194
|
SET_ATTACHMENT_TYPE: {
|
|
195
195
|
actions: 'setAttachmentType',
|
|
196
|
+
cond: 'isNewWalletMode',
|
|
196
197
|
},
|
|
197
198
|
SUBMIT: [
|
|
198
199
|
{
|
|
@@ -358,7 +359,7 @@ export default function (request) {
|
|
|
358
359
|
balance,
|
|
359
360
|
siteConfig,
|
|
360
361
|
userInfo,
|
|
361
|
-
attachmentType: 'withdraw',
|
|
362
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
362
363
|
}
|
|
363
364
|
}),
|
|
364
365
|
updateWithdrawCondition: assign((context, event) => {
|
|
@@ -452,6 +453,7 @@ export default function (request) {
|
|
|
452
453
|
isOtpRequired: (context, event) => {
|
|
453
454
|
return event.data?.status === 'otp-verifying'
|
|
454
455
|
},
|
|
456
|
+
isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
|
|
455
457
|
isNotWithdrawMinDepositAmount: (context, event) => {
|
|
456
458
|
const { withdrawCheck } = context
|
|
457
459
|
return !withdrawCheck?.passDepositeLimit
|
|
@@ -373,7 +373,7 @@ export default function (request) {
|
|
|
373
373
|
const methods = siteConfig?.paymentMethods?.withdraw || []
|
|
374
374
|
return {
|
|
375
375
|
methods,
|
|
376
|
-
attachmentType: 'withdraw',
|
|
376
|
+
attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
|
|
377
377
|
}
|
|
378
378
|
}),
|
|
379
379
|
setMode: assign((context, event) => {
|