@jetthai/cuora 1.1.346-ranking-1 → 1.1.346-wallet-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.
- package/CHANGELOG.md +15 -1
- package/package.json +1 -1
- package/resetGitBranch.sh +49 -0
- package/src/api/game.js +1 -3
- package/src/api/index.js +1 -2
- package/src/machine/activity/activity.js +1 -2
- package/src/machine/common.js +1 -5
- package/src/machine/deposit/direct.js +2 -6
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +10 -51
- package/src/machine/deposit/manual_vn.js +3 -23
- package/src/machine/deposit/qrcode_v2.js +6 -132
- package/src/machine/deposit/virtual_bank_vn.js +3 -31
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/error.js +28 -5
- package/src/machine/game_search_cash.js +10 -2
- package/src/machine/game_search_v2.js +10 -2
- package/src/machine/game_v2_1.js +17 -141
- package/src/machine/index.js +0 -2
- package/src/machine/navbar.js +71 -2
- package/src/machine/promotions.js +4 -5
- package/src/machine/withdraw/withdraw_crypto.js +1 -3
- package/src/machine/withdraw/withdraw_crypto2.js +1 -1
- package/src/machine/withdraw/withdraw_manual.js +1 -2
- package/src/machine/withdraw/withdraw_vn.js +1 -3
- package/src/machine/withdraw/withdraw_vn2.js +1 -1
- package/src/api/ranking.js +0 -26
- package/src/machine/ranking.js +0 -202
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,21 @@
|
|
|
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-
|
|
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
|
+
### [1.1.347](https://github.com/jetthai/cuora-module/compare/v1.1.346...v1.1.347) (2025-03-30)
|
|
6
20
|
|
|
7
21
|
### [1.1.346](https://github.com/jetthai/cuora-module/compare/v1.1.345...v1.1.346) (2025-03-27)
|
|
8
22
|
|
package/package.json
CHANGED
package/resetGitBranch.sh
CHANGED
|
@@ -59,4 +59,53 @@ 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
|
|
62
111
|
fi
|
package/src/api/game.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
getGameSHA: () => ({ method: 'get', url: 'game/list/v2/sha' }),
|
|
3
|
-
getOptionMap: (code) => ({ method: 'get', url: 'game/list/v2/options', params: { code } }),
|
|
4
|
-
getGameStatus: () => ({ method: 'get', url: 'game/list/v2/status' }),
|
|
5
2
|
getGameCategory: ({ id, first } = {}) => ({ method: 'get', url: 'game/list/v2/category', params: { id, first } }),
|
|
6
3
|
addFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/add', params: { games: [code] } }),
|
|
7
4
|
removeFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/remove', params: { games: [code] } }),
|
|
@@ -100,4 +97,5 @@ export default {
|
|
|
100
97
|
}),
|
|
101
98
|
getFreeGameList: () => ({ method: 'get', url: 'activities/getFreeGameRewardList' }),
|
|
102
99
|
getFreeGameReward: ({ activityNo, receiveNo }) => ({ method: 'post', url: 'activities/getFreeGameReward', params: { activityNo, receiveNo } }),
|
|
100
|
+
getV3GameInfo: ({ appSecret, gameCodes }) => ({ method: 'post', url: 'game/list/v3/gameInfo', params: { appSecret, gameCodes } }),
|
|
103
101
|
}
|
package/src/api/index.js
CHANGED
|
@@ -6,6 +6,5 @@ import mailbox from './mailbox.js'
|
|
|
6
6
|
import payment from './payment.js'
|
|
7
7
|
import user from './user.js'
|
|
8
8
|
import form from './form.js'
|
|
9
|
-
import ranking from './ranking.js'
|
|
10
9
|
|
|
11
|
-
export default { activity, auth, common, game, mailbox, payment, user, form
|
|
10
|
+
export default { activity, auth, common, game, mailbox, payment, user, form }
|
|
@@ -186,8 +186,7 @@ export default function (request) {
|
|
|
186
186
|
services: {
|
|
187
187
|
fetchList: async (context, event) => {
|
|
188
188
|
const hasToken = request.getToken()
|
|
189
|
-
const
|
|
190
|
-
const apiCallable = hasToken && isDoubleWallet
|
|
189
|
+
const apiCallable = hasToken
|
|
191
190
|
const [{ data }, promotionList] = await Promise.all([
|
|
192
191
|
hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
|
|
193
192
|
apiCallable && !context.isPlaying ? request.send(payment.getPromotionsList()) : [],
|
package/src/machine/common.js
CHANGED
|
@@ -292,12 +292,8 @@ export default function (request) {
|
|
|
292
292
|
return { announcementList: { data } }
|
|
293
293
|
}),
|
|
294
294
|
setFeeds: assign((context, event) => {
|
|
295
|
-
const { announcementList, broadcastList, mailBoxInfo
|
|
295
|
+
const { announcementList, broadcastList, mailBoxInfo } = event.data
|
|
296
296
|
const promotions = announcementList?.announcements?.filter?.((item) => item.category === 3) || []
|
|
297
|
-
const customerMessageEnable = siteConfig?.csChat?.some((item) => item.enable && item.name === 'customermessage')
|
|
298
|
-
if (!customerMessageEnable) {
|
|
299
|
-
mailBoxInfo.rows -= mailBoxInfo.detailRows.CUSTOMER || 0
|
|
300
|
-
}
|
|
301
297
|
return { broadcastList, mailBoxInfo, promotions }
|
|
302
298
|
}),
|
|
303
299
|
setBroadcast: assign((context, event) => {
|
|
@@ -58,7 +58,6 @@ export default function (request) {
|
|
|
58
58
|
always: [
|
|
59
59
|
{
|
|
60
60
|
target: 'loaded',
|
|
61
|
-
cond: 'isDoubleWalletMode',
|
|
62
61
|
},
|
|
63
62
|
{
|
|
64
63
|
target: 'calculating',
|
|
@@ -91,7 +90,7 @@ export default function (request) {
|
|
|
91
90
|
SUBMIT: [
|
|
92
91
|
{
|
|
93
92
|
target: 'pending',
|
|
94
|
-
cond: (context, event) =>
|
|
93
|
+
cond: (context, event) => !!context.calculation,
|
|
95
94
|
},
|
|
96
95
|
{
|
|
97
96
|
target: 'submitting',
|
|
@@ -129,7 +128,7 @@ export default function (request) {
|
|
|
129
128
|
SUBMIT: [
|
|
130
129
|
{
|
|
131
130
|
target: 'pending',
|
|
132
|
-
cond: (context, event) =>
|
|
131
|
+
cond: (context, event) => !!context.calculation,
|
|
133
132
|
},
|
|
134
133
|
{
|
|
135
134
|
target: 'submitting',
|
|
@@ -247,9 +246,6 @@ export default function (request) {
|
|
|
247
246
|
}),
|
|
248
247
|
},
|
|
249
248
|
guards: {
|
|
250
|
-
isDoubleWalletMode: (context, event) => {
|
|
251
|
-
return context.siteConfig?.walletMode === '4'
|
|
252
|
-
},
|
|
253
249
|
isCalculable: (context, event) => {
|
|
254
250
|
const {
|
|
255
251
|
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 {
|
|
76
|
-
return
|
|
75
|
+
const { bonusPreviewEnable } = siteConfig
|
|
76
|
+
return 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 {
|
|
53
|
-
return !!selectedCard &&
|
|
52
|
+
const { bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedCard && 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 {
|
|
82
|
-
return
|
|
81
|
+
const { bonusPreviewEnable } = siteConfig
|
|
82
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -87,11 +87,6 @@ export default function (request) {
|
|
|
87
87
|
},
|
|
88
88
|
],
|
|
89
89
|
SELECT_AMOUNT: [
|
|
90
|
-
{
|
|
91
|
-
target: 'pending',
|
|
92
|
-
actions: 'setAmount',
|
|
93
|
-
cond: 'isFreeWalletMode',
|
|
94
|
-
},
|
|
95
90
|
{
|
|
96
91
|
target: 'debouncing',
|
|
97
92
|
actions: 'setAmount',
|
|
@@ -99,19 +94,6 @@ export default function (request) {
|
|
|
99
94
|
],
|
|
100
95
|
},
|
|
101
96
|
},
|
|
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
|
-
},
|
|
115
97
|
debouncing: {
|
|
116
98
|
on: {
|
|
117
99
|
SELECT_AMOUNT: {
|
|
@@ -132,19 +114,6 @@ export default function (request) {
|
|
|
132
114
|
invoke: {
|
|
133
115
|
src: 'fetchCalculation',
|
|
134
116
|
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
|
-
},
|
|
148
117
|
{
|
|
149
118
|
target: 'calculated',
|
|
150
119
|
actions: 'setCalculation',
|
|
@@ -158,17 +127,10 @@ export default function (request) {
|
|
|
158
127
|
calculable: {
|
|
159
128
|
entry: 'clearCalculation',
|
|
160
129
|
on: {
|
|
161
|
-
SELECT_AMOUNT:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
cond: 'isFreeWalletMode',
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
target: 'debouncing',
|
|
169
|
-
actions: 'setAmount',
|
|
170
|
-
},
|
|
171
|
-
],
|
|
130
|
+
SELECT_AMOUNT: {
|
|
131
|
+
target: 'debouncing',
|
|
132
|
+
actions: 'setAmount',
|
|
133
|
+
},
|
|
172
134
|
BACK: {
|
|
173
135
|
target: 'loaded',
|
|
174
136
|
},
|
|
@@ -216,8 +178,8 @@ export default function (request) {
|
|
|
216
178
|
actions: 'setCard',
|
|
217
179
|
cond: (context, event) => {
|
|
218
180
|
const { siteConfig = {}, promotion = {} } = context
|
|
219
|
-
const {
|
|
220
|
-
return
|
|
181
|
+
const { bonusPreviewEnable } = siteConfig
|
|
182
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
221
183
|
},
|
|
222
184
|
},
|
|
223
185
|
{
|
|
@@ -325,9 +287,6 @@ export default function (request) {
|
|
|
325
287
|
}),
|
|
326
288
|
},
|
|
327
289
|
guards: {
|
|
328
|
-
isFreeWalletMode: (context, event) => {
|
|
329
|
-
return context.siteConfig?.walletMode === '2'
|
|
330
|
-
},
|
|
331
290
|
isSubmittable: (context, event) => {
|
|
332
291
|
const { cardNumber, serialNumber } = context
|
|
333
292
|
return cardNumber && serialNumber
|
|
@@ -75,24 +75,8 @@ export default function (request) {
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
step1: {
|
|
78
|
-
initial: '
|
|
78
|
+
initial: 'idle',
|
|
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
|
-
},
|
|
96
80
|
idle: {},
|
|
97
81
|
calculating: {
|
|
98
82
|
invoke: {
|
|
@@ -137,11 +121,10 @@ export default function (request) {
|
|
|
137
121
|
{
|
|
138
122
|
target: 'pending',
|
|
139
123
|
cond: (context, event) => {
|
|
140
|
-
const {
|
|
141
|
-
const { walletMode } = siteConfig
|
|
124
|
+
const { calculation, promotion } = context
|
|
142
125
|
const { promotionsNo, activityNo } = promotion
|
|
143
126
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
144
|
-
return
|
|
127
|
+
return !!calculation && !isNoBonus
|
|
145
128
|
},
|
|
146
129
|
},
|
|
147
130
|
{
|
|
@@ -385,9 +368,6 @@ export default function (request) {
|
|
|
385
368
|
}),
|
|
386
369
|
},
|
|
387
370
|
guards: {
|
|
388
|
-
isDoubleWalletMode: (context, event) => {
|
|
389
|
-
return context.siteConfig?.walletMode === '4'
|
|
390
|
-
},
|
|
391
371
|
isCalculable: (context, event) => {
|
|
392
372
|
const {
|
|
393
373
|
amount,
|
|
@@ -49,16 +49,8 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedQrcode } = context
|
|
52
|
-
const {
|
|
53
|
-
return !!selectedQrcode &&
|
|
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
|
|
52
|
+
const { bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedQrcode && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
62
54
|
},
|
|
63
55
|
},
|
|
64
56
|
{ target: 'loaded' },
|
|
@@ -86,51 +78,21 @@ export default function (request) {
|
|
|
86
78
|
actions: 'setQrcode',
|
|
87
79
|
cond: (context, event) => {
|
|
88
80
|
const { siteConfig = {}, promotion = {} } = context
|
|
89
|
-
const {
|
|
90
|
-
return
|
|
81
|
+
const { bonusPreviewEnable } = siteConfig
|
|
82
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
91
83
|
},
|
|
92
84
|
},
|
|
93
|
-
{
|
|
94
|
-
target: 'debouncing',
|
|
95
|
-
actions: ['setQrcode', 'setPromotionDefaultAmount'],
|
|
96
|
-
cond: (context, event) => context.siteConfig?.walletMode === '3' && context.promotion?.minimumAmount,
|
|
97
|
-
},
|
|
98
85
|
{
|
|
99
86
|
actions: 'setQrcode',
|
|
100
87
|
},
|
|
101
88
|
],
|
|
102
89
|
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
|
-
},
|
|
123
90
|
{
|
|
124
91
|
target: 'debouncing',
|
|
125
92
|
actions: 'setAmount',
|
|
126
93
|
},
|
|
127
94
|
],
|
|
128
95
|
KEY_IN: [
|
|
129
|
-
{
|
|
130
|
-
target: 'pending',
|
|
131
|
-
actions: 'setAmount',
|
|
132
|
-
cond: 'isFreeWalletMode',
|
|
133
|
-
},
|
|
134
96
|
{
|
|
135
97
|
target: 'calculating',
|
|
136
98
|
actions: 'setAmount',
|
|
@@ -138,51 +100,9 @@ export default function (request) {
|
|
|
138
100
|
],
|
|
139
101
|
},
|
|
140
102
|
},
|
|
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
|
-
},
|
|
163
103
|
debouncing: {
|
|
164
104
|
on: {
|
|
165
105
|
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
|
-
},
|
|
186
106
|
{
|
|
187
107
|
target: 'debouncing',
|
|
188
108
|
actions: 'setAmount',
|
|
@@ -202,26 +122,6 @@ export default function (request) {
|
|
|
202
122
|
entry: 'clearCalculation',
|
|
203
123
|
on: {
|
|
204
124
|
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
|
-
},
|
|
225
125
|
{
|
|
226
126
|
target: 'debouncing',
|
|
227
127
|
actions: 'setAmount',
|
|
@@ -240,11 +140,6 @@ export default function (request) {
|
|
|
240
140
|
invoke: {
|
|
241
141
|
src: 'fetchCalculation',
|
|
242
142
|
onDone: [
|
|
243
|
-
{
|
|
244
|
-
target: 'submitting',
|
|
245
|
-
actions: 'setCalculation',
|
|
246
|
-
cond: 'isFreeWalletMode',
|
|
247
|
-
},
|
|
248
143
|
{
|
|
249
144
|
target: 'calculated',
|
|
250
145
|
actions: 'setCalculation',
|
|
@@ -258,16 +153,6 @@ export default function (request) {
|
|
|
258
153
|
calculated: {
|
|
259
154
|
on: {
|
|
260
155
|
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
|
-
},
|
|
271
156
|
{
|
|
272
157
|
target: 'debouncing',
|
|
273
158
|
actions: 'addAmount',
|
|
@@ -314,8 +199,8 @@ export default function (request) {
|
|
|
314
199
|
actions: 'setQrcode',
|
|
315
200
|
cond: (context, event) => {
|
|
316
201
|
const { siteConfig = {}, promotion = {} } = context
|
|
317
|
-
const {
|
|
318
|
-
return
|
|
202
|
+
const { bonusPreviewEnable } = siteConfig
|
|
203
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
319
204
|
},
|
|
320
205
|
},
|
|
321
206
|
{
|
|
@@ -395,19 +280,8 @@ export default function (request) {
|
|
|
395
280
|
promotion,
|
|
396
281
|
}
|
|
397
282
|
}),
|
|
398
|
-
setPromotionDefaultAmount: assign((context, event) => {
|
|
399
|
-
return {
|
|
400
|
-
selectedAmount: context.promotion.minimumAmount,
|
|
401
|
-
}
|
|
402
|
-
}),
|
|
403
283
|
},
|
|
404
284
|
guards: {
|
|
405
|
-
isDoubleWalletMode: (context, event) => {
|
|
406
|
-
return context.siteConfig?.walletMode === '4'
|
|
407
|
-
},
|
|
408
|
-
isFreeWalletMode: (context, event) => {
|
|
409
|
-
return context.siteConfig?.walletMode === '2'
|
|
410
|
-
},
|
|
411
285
|
isGrandTotalEnable: (context, event) => {
|
|
412
286
|
return context.grandTotalEnable === 1
|
|
413
287
|
},
|
|
@@ -45,24 +45,8 @@ export default function (request) {
|
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
47
|
step1: {
|
|
48
|
-
initial: '
|
|
48
|
+
initial: 'idle',
|
|
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
|
-
},
|
|
66
50
|
idle: {},
|
|
67
51
|
calculating: {
|
|
68
52
|
invoke: {
|
|
@@ -104,11 +88,10 @@ export default function (request) {
|
|
|
104
88
|
{
|
|
105
89
|
target: 'pending',
|
|
106
90
|
cond: (context, event) => {
|
|
107
|
-
const {
|
|
108
|
-
const { walletMode } = siteConfig
|
|
91
|
+
const { calculation, promotion } = context
|
|
109
92
|
const { promotionsNo, activityNo } = promotion
|
|
110
93
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
111
|
-
return
|
|
94
|
+
return !!calculation && !isNoBonus
|
|
112
95
|
},
|
|
113
96
|
},
|
|
114
97
|
{
|
|
@@ -231,16 +214,8 @@ export default function (request) {
|
|
|
231
214
|
promotion: event.data,
|
|
232
215
|
}
|
|
233
216
|
}),
|
|
234
|
-
setPromotionDefaultAmount: assign((context, event) => {
|
|
235
|
-
return {
|
|
236
|
-
amount: context.promotion.minimumAmount,
|
|
237
|
-
}
|
|
238
|
-
}),
|
|
239
217
|
},
|
|
240
218
|
guards: {
|
|
241
|
-
isDoubleWalletMode: (context, event) => {
|
|
242
|
-
return context.siteConfig?.walletMode === '4'
|
|
243
|
-
},
|
|
244
219
|
isCalculable: (context, event) => {
|
|
245
220
|
const {
|
|
246
221
|
amount,
|
|
@@ -254,9 +229,6 @@ export default function (request) {
|
|
|
254
229
|
isProcessing: (context, event) => {
|
|
255
230
|
return context.processing
|
|
256
231
|
},
|
|
257
|
-
hasMinPromotionDeposit: (context, event) => {
|
|
258
|
-
return context.promotion?.minimumAmount
|
|
259
|
-
},
|
|
260
232
|
},
|
|
261
233
|
services: {
|
|
262
234
|
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 {
|
|
78
|
-
return
|
|
77
|
+
const { bonusPreviewEnable } = siteConfig
|
|
78
|
+
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
{ target: 'loaded' },
|