@jetthai/cuora 2.0.0-beta.0 → 2.0.0

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 (201) hide show
  1. package/.claude/commands/sync-ai-prompts.md +93 -0
  2. package/.claude/settings.local.json +23 -0
  3. package/.github/copilot-instructions.md +405 -0
  4. package/.husky/post-checkout +32 -0
  5. package/.husky/pre-commit +1 -3
  6. package/.husky/pre-push +36 -0
  7. package/AGENTS.md +405 -0
  8. package/AI_PROMPT_SOURCE.md +403 -0
  9. package/CHANGELOG.md +274 -3
  10. package/CLAUDE.md +405 -0
  11. package/GEMINI.md +405 -0
  12. package/README.md +299 -15
  13. package/docs/kibana/crypto-way-deposit-amount-bug-analysis.md +1003 -0
  14. package/docs/kibana/play-providerId-error.md +202 -0
  15. package/docs/kibana/play-selectedWalletType.md +1 -0
  16. package/docs/kibana/play-selectedWalletType_2.md +1 -0
  17. package/docs/kibana/play-selectedWalletType_analysis.md +565 -0
  18. package/package.json +3 -3
  19. package/scripts/auto-version.js +68 -0
  20. package/scripts/auto-version.sh +33 -0
  21. package/scripts/branch-auto-npm-publish.js +29 -0
  22. package/scripts/check-version.sh +36 -0
  23. package/scripts/clean-tags.sh +84 -0
  24. package/src/api/account.js +0 -1
  25. package/src/api/activity.js +22 -37
  26. package/src/api/auth.js +5 -36
  27. package/src/api/common.js +5 -3
  28. package/src/api/game.js +0 -10
  29. package/src/api/payment.js +17 -55
  30. package/src/api/user.js +10 -16
  31. package/src/index.js +2 -2
  32. package/src/machine/activity/activity_cash.js +84 -36
  33. package/src/machine/activity/cash_rain_activity.js +0 -1
  34. package/src/machine/activity/continue_deposit_activity.js +0 -1
  35. package/src/machine/activity/deposit_activity.js +0 -1
  36. package/src/machine/activity/diamond_shop_activity_cash.js +0 -8
  37. package/src/machine/activity/fafafa_activity.js +0 -11
  38. package/src/machine/activity/friend_invite_friends_activity.js +8 -7
  39. package/src/machine/activity/index.js +0 -12
  40. package/src/machine/activity/instant_rebate_activity.js +0 -1
  41. package/src/machine/activity/jackpot.js +0 -1
  42. package/src/machine/activity/otp_verified_activity.js +0 -1
  43. package/src/machine/activity/ranking_activity.js +0 -1
  44. package/src/machine/activity/roulette_activity_v2.js +0 -1
  45. package/src/machine/activity/sign_in_activity.js +0 -1
  46. package/src/machine/activity/sign_in_monthly_activity.js +1 -2
  47. package/src/machine/activity/specify_bets_activity.js +0 -1
  48. package/src/machine/activity/specify_turnover_activity.js +0 -1
  49. package/src/machine/activity/time_bomb_activity.js +0 -1
  50. package/src/machine/activity/vip_card_activity.js +0 -1
  51. package/src/machine/auth.js +112 -112
  52. package/src/machine/auth_otp_v3.js +11 -8
  53. package/src/machine/bank_binding.js +2 -3
  54. package/src/machine/common.js +14 -98
  55. package/src/machine/deposit/crypto_bank_cash.js +20 -35
  56. package/src/machine/deposit/crypto_qrcode_cash.js +26 -64
  57. package/src/machine/deposit/crypto_way_cash.js +48 -37
  58. package/src/machine/deposit/direct_cash.js +8 -10
  59. package/src/machine/deposit/index.js +0 -28
  60. package/src/machine/deposit/loadcard_cash.js +14 -32
  61. package/src/machine/deposit/manual_cash.js +8 -11
  62. package/src/machine/deposit/qrcode_cash.js +15 -32
  63. package/src/machine/deposit/usdt_cash.js +1 -15
  64. package/src/machine/deposit/virtual_bank_cash.js +13 -12
  65. package/src/machine/error.js +7 -1
  66. package/src/machine/game_betslip.js +0 -1
  67. package/src/machine/game_favorite_v2.js +0 -1
  68. package/src/machine/game_info.js +1 -13
  69. package/src/machine/game_search_cash.js +0 -1
  70. package/src/machine/game_v2_1.js +39 -126
  71. package/src/machine/honor_board_cash.js +8 -11
  72. package/src/machine/inbox.js +43 -105
  73. package/src/machine/index.js +0 -32
  74. package/src/machine/leaderboard.js +8 -12
  75. package/src/machine/navbar.js +1 -3
  76. package/src/machine/ranking.js +45 -30
  77. package/src/machine/reward_cash.js +0 -40
  78. package/src/machine/roulette_v2.js +14 -11
  79. package/src/machine/setting.js +0 -1
  80. package/src/machine/side_cash.js +3 -3
  81. package/src/machine/user_info.js +0 -1
  82. package/src/machine/user_photo.js +0 -1
  83. package/src/machine/user_reset_password.js +0 -14
  84. package/src/machine/user_sign_up.js +46 -61
  85. package/src/machine/websocket.js +18 -62
  86. package/src/machine/withdraw/index.js +0 -6
  87. package/src/machine/withdraw/withdraw_manual_cash.js +59 -39
  88. package/src/request/config.js +2 -0
  89. package/src/request/request.js +49 -60
  90. package/src/util/amount.js +8 -0
  91. package/src/util/constant.js +0 -1
  92. package/src/util/err998SentryExtra.js +26 -0
  93. package/src/util/index.js +2 -4
  94. package/src/util/paramStore.js +139 -0
  95. package/src/util/storage.js +3 -4
  96. package/BREAKING_CHANGES.md +0 -9
  97. package/resetGitBranch.sh +0 -101
  98. package/src/lib/fingerprint_v3_11_12.js +0 -11433
  99. package/src/machine/activity/activity.js +0 -213
  100. package/src/machine/activity/diamond_shop_activity_fc.js +0 -197
  101. package/src/machine/activity/diamond_shop_activity_vn.js +0 -179
  102. package/src/machine/activity/invite_friends_activity.js +0 -115
  103. package/src/machine/activity/mini_game_activity.js +0 -69
  104. package/src/machine/activity/return_bonus_activity.js +0 -155
  105. package/src/machine/auth_otp_v2.js +0 -178
  106. package/src/machine/bank_binding_amb.js +0 -146
  107. package/src/machine/bonus.js +0 -76
  108. package/src/machine/deposit/amb.js +0 -93
  109. package/src/machine/deposit/crypto_bank.js +0 -340
  110. package/src/machine/deposit/crypto_qrcode.js +0 -158
  111. package/src/machine/deposit/crypto_way.js +0 -253
  112. package/src/machine/deposit/deposit_fc.js +0 -272
  113. package/src/machine/deposit/direct.js +0 -311
  114. package/src/machine/deposit/float.js +0 -375
  115. package/src/machine/deposit/krway.js +0 -152
  116. package/src/machine/deposit/loadcard_vn.js +0 -352
  117. package/src/machine/deposit/manual_vn.js +0 -459
  118. package/src/machine/deposit/qrcode_v2.js +0 -339
  119. package/src/machine/deposit/usdt.js +0 -163
  120. package/src/machine/deposit/virtual_bank_vn.js +0 -270
  121. package/src/machine/deposit/vpay.js +0 -374
  122. package/src/machine/game_hot_new.js +0 -80
  123. package/src/machine/game_replay.js +0 -47
  124. package/src/machine/game_search_v2.js +0 -402
  125. package/src/machine/honor_board.js +0 -133
  126. package/src/machine/merge.js +0 -58
  127. package/src/machine/payment_data.js +0 -87
  128. package/src/machine/promotions.js +0 -163
  129. package/src/machine/reward.js +0 -256
  130. package/src/machine/reward_fc.js +0 -99
  131. package/src/machine/side.js +0 -160
  132. package/src/machine/side_v2.js +0 -223
  133. package/src/machine/vip_table.js +0 -58
  134. package/src/machine/welcome.js +0 -111
  135. package/src/machine/withdraw/withdraw_crypto_cash.js +0 -328
  136. package/src/machine/withdraw/withdraw_krway.js +0 -223
  137. package/src/machine/withdraw/withdraw_manual.js +0 -541
  138. package/src/util/deviceToken.js +0 -60
  139. package/src/util/math.js +0 -4
  140. package/test/api.behavior.test.js +0 -69
  141. package/test/api.contract.test.js +0 -18
  142. package/test/config.test.js +0 -27
  143. package/test/deviceToken.test.js +0 -139
  144. package/test/helpers.coverage.test.js +0 -11
  145. package/test/helpers.js +0 -91
  146. package/test/index.exports.test.js +0 -14
  147. package/test/machine.activity.core.coverage.test.js +0 -337
  148. package/test/machine.activity.gap.coverage.test.js +0 -252
  149. package/test/machine.activity.more.coverage.test.js +0 -180
  150. package/test/machine.activity_plus_and_binding_amb.coverage.test.js +0 -201
  151. package/test/machine.activity_timer_bonus.coverage.test.js +0 -136
  152. package/test/machine.activity_welcome.low.coverage.test.js +0 -211
  153. package/test/machine.amb_rewardfc_websocket.more.coverage.test.js +0 -201
  154. package/test/machine.auth.coverage.test.js +0 -215
  155. package/test/machine.bank_binding.test.js +0 -143
  156. package/test/machine.binding_otp_krway.coverage.test.js +0 -223
  157. package/test/machine.contract.test.js +0 -50
  158. package/test/machine.crypto_bank.coverage.test.js +0 -270
  159. package/test/machine.crypto_way.coverage.test.js +0 -108
  160. package/test/machine.crypto_way_cash.coverage.test.js +0 -114
  161. package/test/machine.definition.test.js +0 -137
  162. package/test/machine.deposit.manual.coverage.test.js +0 -365
  163. package/test/machine.deposit_fc.coverage.test.js +0 -126
  164. package/test/machine.direct.coverage.test.js +0 -96
  165. package/test/machine.direct_cash.coverage.test.js +0 -108
  166. package/test/machine.error.coverage.test.js +0 -37
  167. package/test/machine.events.test.js +0 -126
  168. package/test/machine.favorite_jackpot.coverage.test.js +0 -82
  169. package/test/machine.float.coverage.test.js +0 -136
  170. package/test/machine.flow.test.js +0 -226
  171. package/test/machine.game_hot_new_vip_table.coverage.test.js +0 -105
  172. package/test/machine.game_search_cash.coverage.test.js +0 -155
  173. package/test/machine.game_search_v2.test.js +0 -199
  174. package/test/machine.game_user_profile.coverage.test.js +0 -100
  175. package/test/machine.honor_board.test.js +0 -133
  176. package/test/machine.inbox.common.coverage.test.js +0 -304
  177. package/test/machine.loadcard_cash.coverage.test.js +0 -101
  178. package/test/machine.loadcard_vn.coverage.test.js +0 -122
  179. package/test/machine.misc.coverage.test.js +0 -361
  180. package/test/machine.more2.coverage.test.js +0 -261
  181. package/test/machine.options.execution.test.js +0 -272
  182. package/test/machine.priority.coverage.test.js +0 -603
  183. package/test/machine.qrcode_cash.coverage.test.js +0 -107
  184. package/test/machine.qrcode_v2.coverage.test.js +0 -121
  185. package/test/machine.regression.test.js +0 -82
  186. package/test/machine.roulette_v2.test.js +0 -142
  187. package/test/machine.side_reward_reset.coverage.test.js +0 -220
  188. package/test/machine.targeted.coverage.test.js +0 -313
  189. package/test/machine.usdt.coverage.test.js +0 -95
  190. package/test/machine.usdt_cash.coverage.test.js +0 -73
  191. package/test/machine.vip_card_activity.test.js +0 -114
  192. package/test/machine.virtual_bank_cash.coverage.test.js +0 -105
  193. package/test/machine.virtual_bank_vn.coverage.test.js +0 -105
  194. package/test/machine.vpay.coverage.test.js +0 -142
  195. package/test/machine.withdraw_crypto_cash.coverage.test.js +0 -166
  196. package/test/machine.withdraw_krway.coverage.test.js +0 -123
  197. package/test/machine.withdraw_manual.coverage.test.js +0 -185
  198. package/test/machine.withdraw_manual_cash.coverage.test.js +0 -123
  199. package/test/request.test.js +0 -325
  200. package/test/util.storage.errors.test.js +0 -47
  201. package/test/util.test.js +0 -41
@@ -1,152 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import payment from '../../api/payment.js'
3
- import mailbox from '../../api/mailbox.js'
4
-
5
- export default function (request) {
6
- return createMachine(
7
- {
8
- id: 'krway',
9
- predictableActionArguments: true,
10
- initial: 'loading',
11
- context: {
12
- currentCategory: 'krway',
13
- paymentDetail: [],
14
- currentPayment: null,
15
- options: [],
16
- amount: null,
17
- processing: null,
18
- },
19
- states: {
20
- loading: {
21
- invoke: {
22
- src: 'fetchPaymentDetail',
23
- onDone: {
24
- target: 'checking',
25
- actions: 'setPaymentDetail',
26
- },
27
- onError: {
28
- target: 'fail',
29
- },
30
- },
31
- },
32
- checking: {
33
- always: [
34
- {
35
- target: 'processing',
36
- cond: 'isProcessing',
37
- },
38
- {
39
- target: 'idle',
40
- },
41
- ],
42
- },
43
- processing: {},
44
- idle: {},
45
- inquiring: {
46
- invoke: {
47
- src: 'accountInquiry',
48
- onDone: {
49
- target: 'inquired',
50
- },
51
- onError: {
52
- target: 'idle',
53
- },
54
- },
55
- },
56
- inquired: {
57
- after: {
58
- 0: {
59
- target: 'idle',
60
- },
61
- },
62
- },
63
- submitting: {
64
- invoke: {
65
- src: 'submitDeposit',
66
- onDone: {
67
- target: 'submitted',
68
- actions: 'setProcessing',
69
- },
70
- onError: {
71
- target: 'fail',
72
- },
73
- },
74
- },
75
- submitted: {},
76
- fail: {},
77
- },
78
- on: {
79
- INQUIRY_ACCOUNT: {
80
- target: 'inquiring',
81
- },
82
- ADD_AMOUNT: {
83
- actions: 'addAmount',
84
- },
85
- SET_AMOUNT: {
86
- actions: 'setAmount',
87
- },
88
- CLEAR_AMOUNT: {
89
- actions: 'clearAmount',
90
- },
91
- SUBMIT: {
92
- target: 'submitting',
93
- },
94
- },
95
- },
96
- {
97
- actions: {
98
- setPaymentDetail: assign((context, event) => {
99
- const paymentDetail = event.data
100
- const payments = paymentDetail.filter((item) => item.category === context.currentCategory)
101
- const currentPayment = payments[0]
102
- const options = currentPayment.optional || []
103
-
104
- return {
105
- currentPayment,
106
- options,
107
- processing: currentPayment.processing?.[0],
108
- }
109
- }),
110
- addAmount: assign((context, event) => {
111
- return {
112
- amount: parseFloat(`${context.amount || 0}`) + parseFloat(`${event.data}`),
113
- }
114
- }),
115
- setAmount: assign((context, event) => {
116
- return { amount: parseFloat(`${event.data}`) }
117
- }),
118
- clearAmount: assign((context, event) => {
119
- return { amount: null }
120
- }),
121
- setProcessing: assign((context, event) => {
122
- return {
123
- processing: event.data,
124
- }
125
- }),
126
- },
127
- guards: {
128
- isProcessing: (context, event) => {
129
- return context.processing
130
- },
131
- },
132
- services: {
133
- fetchPaymentDetail: async (context, event) => {
134
- return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
135
- },
136
- accountInquiry: async (context, event) => {
137
- const { from, title, content } = event.data
138
- return await request.send(mailbox.sendMessage({ type: 'CUSTOMER', category: 'DEPOSIT', from, to: 'SYSTEM', title, content }))
139
- },
140
- submitDeposit: async (context, event) => {
141
- const { currentPayment, amount } = context
142
- return await request.send(
143
- payment.submitDepositTransaction({
144
- method: currentPayment.method,
145
- amount,
146
- })
147
- )
148
- },
149
- },
150
- }
151
- )
152
- }
@@ -1,352 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import payment from '../../api/payment.js'
3
- import common from '../../api/common.js'
4
-
5
- export default function (request) {
6
- const { appSecret } = request.config
7
- return createMachine(
8
- {
9
- id: 'loadcard',
10
- predictableActionArguments: true,
11
- initial: 'loading',
12
- context: {
13
- siteConfig: null,
14
- cards: [],
15
- options: [],
16
-
17
- selectedCard: null,
18
- selectedAmount: null,
19
- cardNumber: null,
20
- serialNumber: null,
21
-
22
- calculation: null,
23
-
24
- paymentDetail: [],
25
- currentCategory: 'loadcard',
26
- currentMethod: null,
27
- currentPayment: null,
28
- result: null,
29
-
30
- // use for wallet mode 4
31
- promotion: null,
32
- bonusPreviewData: [],
33
- },
34
- states: {
35
- loading: {
36
- invoke: {
37
- src: 'fetchInitData',
38
- onDone: {
39
- target: 'checking',
40
- actions: 'setInitData',
41
- },
42
- onError: {
43
- target: 'fail',
44
- },
45
- },
46
- },
47
- checking: {
48
- always: [
49
- {
50
- target: 'fetching',
51
- cond: (context, event) => {
52
- const { siteConfig = {}, promotion = {}, selectedCard } = context
53
- const { bonusPreviewEnable } = siteConfig
54
- return !!selectedCard && bonusPreviewEnable && promotion.activityNo != 'none'
55
- },
56
- },
57
- { target: 'loaded' },
58
- ],
59
- },
60
- fetching: {
61
- invoke: {
62
- src: 'fetchBonusPreview',
63
- onDone: {
64
- target: 'loaded',
65
- actions: 'setBonusPreview',
66
- },
67
- onError: {
68
- target: 'loaded',
69
- },
70
- },
71
- },
72
- fail: {},
73
- loaded: {
74
- entry: 'reset',
75
- on: {
76
- SELECT_CARD: [
77
- {
78
- target: 'fetching',
79
- actions: 'setCard',
80
- cond: (context, event) => {
81
- const { siteConfig = {}, promotion = {} } = context
82
- const { bonusPreviewEnable } = siteConfig
83
- return bonusPreviewEnable && promotion.activityNo != 'none'
84
- },
85
- },
86
- {
87
- actions: 'setCard',
88
- },
89
- ],
90
- SELECT_AMOUNT: [
91
- {
92
- target: 'debouncing',
93
- actions: 'setAmount',
94
- },
95
- ],
96
- },
97
- },
98
- debouncing: {
99
- on: {
100
- SELECT_AMOUNT: {
101
- target: 'debouncing',
102
- actions: 'setAmount',
103
- },
104
- BACK: {
105
- target: 'loaded',
106
- },
107
- },
108
- after: {
109
- 1000: {
110
- target: 'calculating',
111
- },
112
- },
113
- },
114
- calculating: {
115
- invoke: {
116
- src: 'fetchCalculation',
117
- onDone: [
118
- {
119
- target: 'calculated',
120
- actions: 'setCalculation',
121
- },
122
- ],
123
- onError: {
124
- target: 'calculable',
125
- },
126
- },
127
- },
128
- calculable: {
129
- entry: 'clearCalculation',
130
- on: {
131
- SELECT_AMOUNT: {
132
- target: 'debouncing',
133
- actions: 'setAmount',
134
- },
135
- BACK: {
136
- target: 'loaded',
137
- },
138
- },
139
- },
140
- calculated: {
141
- on: {
142
- SELECT_AMOUNT: {
143
- target: 'debouncing',
144
- actions: 'setAmount',
145
- },
146
- CONFIRM: [
147
- {
148
- target: 'submitting',
149
- cond: 'jumpLinkEnable',
150
- },
151
- {
152
- target: 'cardInfo',
153
- },
154
- ],
155
- BACK: {
156
- target: 'loaded',
157
- },
158
- CLEAR_CALCULATION: {
159
- target: 'debouncing',
160
- actions: 'clearCalculation',
161
- },
162
- },
163
- },
164
- cardInfo: {
165
- on: {
166
- INPUT_CARD_NUMBER: {
167
- actions: 'setCardNumber',
168
- },
169
- INPUT_SERIAL_NUMBER: {
170
- actions: 'setSerialNumber',
171
- },
172
- SUBMIT: {
173
- target: 'submitting',
174
- cond: 'isSubmittable',
175
- },
176
- SELECT_CARD: [
177
- {
178
- target: 'fetching',
179
- actions: 'setCard',
180
- cond: (context, event) => {
181
- const { siteConfig = {}, promotion = {} } = context
182
- const { bonusPreviewEnable } = siteConfig
183
- return bonusPreviewEnable && promotion.activityNo != 'none'
184
- },
185
- },
186
- {
187
- target: 'loaded',
188
- actions: 'setCard',
189
- },
190
- ],
191
- },
192
- },
193
- submitting: {
194
- invoke: {
195
- src: 'submitDeposit',
196
- onDone: {
197
- target: 'submitted',
198
- actions: 'setResult',
199
- },
200
- onError: {
201
- target: 'loaded',
202
- },
203
- },
204
- },
205
- submitted: {
206
- on: {
207
- BACK: {
208
- target: 'loaded',
209
- },
210
- },
211
- },
212
- },
213
- on: {
214
- SET_PROMOTION: {
215
- actions: 'setPromotion',
216
- },
217
- },
218
- },
219
- {
220
- actions: {
221
- reset: assign((context, event) => {
222
- return {
223
- selectedAmount: null,
224
- cardNumber: null,
225
- serialNumber: null,
226
- calculation: null,
227
- result: null,
228
- }
229
- }),
230
- setInitData: assign((context, event) => {
231
- const { siteConfig, paymentDetail } = event.data
232
- const cards = paymentDetail.filter((element) => element.category === context.currentCategory)
233
- const selectedCard = cards[0]
234
- return {
235
- siteConfig,
236
- paymentDetail,
237
- cards,
238
- selectedCard,
239
- currentMethod: selectedCard?.method,
240
- options: selectedCard?.optional,
241
- }
242
- }),
243
- setBonusPreview: assign((context, event) => {
244
- return {
245
- bonusPreviewData: event.data,
246
- }
247
- }),
248
- setCard: assign((context, event) => {
249
- return {
250
- selectedCard: event.data,
251
- currentMethod: event.data.method,
252
- options: event.data.optional,
253
- }
254
- }),
255
- setCardNumber: assign((context, event) => {
256
- return {
257
- cardNumber: event.data,
258
- }
259
- }),
260
- setSerialNumber: assign((context, event) => {
261
- return {
262
- serialNumber: event.data,
263
- }
264
- }),
265
- setAmount: assign((context, event) => {
266
- return { selectedAmount: event.data }
267
- }),
268
- setCalculation: assign((context, event) => {
269
- // V2接口轉換中回傳的資料結構不同
270
- const { data } = event.data
271
- if (data) {
272
- return {
273
- calculation: data,
274
- }
275
- } else {
276
- return {
277
- calculation: event.data,
278
- }
279
- }
280
- }),
281
- clearCalculation: assign((context, event) => {
282
- return {
283
- calculation: null,
284
- }
285
- }),
286
- setResult: assign((context, event) => {
287
- return {
288
- result: event.data,
289
- }
290
- }),
291
- setPromotion: assign((context, event) => {
292
- const promotion = event.data
293
- return {
294
- promotion,
295
- }
296
- }),
297
- },
298
- guards: {
299
- isSubmittable: (context, event) => {
300
- const { cardNumber, serialNumber } = context
301
- return cardNumber && serialNumber
302
- },
303
- jumpLinkEnable: (context, event) => {
304
- const { selectedCard } = context
305
- return selectedCard.jumpLinkEnable === 1
306
- },
307
- },
308
- services: {
309
- fetchInitData: async (context, event) => {
310
- const [{ config }, paymentDetail = []] = await Promise.all([
311
- request.send(common.getConfig({ appSecret })),
312
- request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
313
- ])
314
- const siteConfig = JSON.parse(window.atob(config))
315
- return { siteConfig, paymentDetail }
316
- },
317
- fetchBonusPreview: async (context, event) => {
318
- const { currentMethod, promotion } = context
319
- return await request.send(
320
- payment.getBonusPreview({
321
- method: currentMethod,
322
- promotionsNo: promotion?.activityNo,
323
- })
324
- )
325
- },
326
- fetchCalculation: async (context, event) => {
327
- const { currentMethod, selectedAmount, promotion } = context
328
- return await request.send(
329
- payment.getDepositExpectedResult({
330
- method: currentMethod,
331
- amount: Number(selectedAmount),
332
- promotionsNo: promotion?.activityNo,
333
- })
334
- )
335
- },
336
- submitDeposit: async (context, event) => {
337
- const { currentMethod, selectedCard, selectedAmount, cardNumber, serialNumber, promotion } = context
338
- return await request.send(
339
- payment.submitDepositTransactionLoadcard({
340
- method: currentMethod,
341
- amount: selectedAmount,
342
- card_type: selectedCard.channel_id,
343
- card_code: cardNumber,
344
- card_seri: serialNumber,
345
- promotionsNo: promotion?.activityNo,
346
- })
347
- )
348
- },
349
- },
350
- }
351
- )
352
- }