@jetthai/cuora 1.0.204 → 1.0.302-dev-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.
Files changed (110) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/.prettierignore +1 -0
  3. package/CHANGELOG.md +848 -0
  4. package/README.md +6 -0
  5. package/package.json +6 -9
  6. package/src/api/activity.js +43 -2
  7. package/src/api/auth.js +22 -7
  8. package/src/api/common.js +3 -1
  9. package/src/api/game.js +20 -7
  10. package/src/api/mailbox.js +9 -5
  11. package/src/api/payment.js +167 -19
  12. package/src/api/user.js +7 -0
  13. package/src/lib/fingerprint.js +9779 -0
  14. package/src/machine/activity/activity.js +111 -26
  15. package/src/machine/activity/activity_cash.js +159 -0
  16. package/src/machine/activity/cash_rain_activity.js +153 -0
  17. package/src/machine/activity/continue_deposit_activity.js +11 -2
  18. package/src/machine/activity/deposit_activity.js +13 -4
  19. package/src/machine/activity/diamond_shop_activity_cash.js +179 -0
  20. package/src/machine/activity/diamond_shop_activity_vn.js +54 -89
  21. package/src/machine/activity/fafafa_activity.js +34 -19
  22. package/src/machine/activity/{affiliate_invite_friends_activity.js → friend_invite_friends_activity.js} +72 -45
  23. package/src/machine/activity/index.js +22 -4
  24. package/src/machine/activity/instant_rebate_activity.js +217 -0
  25. package/src/machine/activity/invite_friends_activity.js +14 -14
  26. package/src/machine/activity/jackpot.js +74 -0
  27. package/src/machine/activity/otp_verified_activity.js +74 -0
  28. package/src/machine/activity/ranking_activity.js +11 -2
  29. package/src/machine/activity/roulette_activity_v2.js +90 -0
  30. package/src/machine/activity/sign_in_activity.js +21 -14
  31. package/src/machine/activity/sign_in_monthly_activity.js +65 -0
  32. package/src/machine/activity/specify_bets_activity.js +25 -3
  33. package/src/machine/activity/specify_turnover_activity.js +25 -3
  34. package/src/machine/activity/time_bomb_activity.js +11 -2
  35. package/src/machine/activity/vip_card_activity.js +140 -0
  36. package/src/machine/auth.js +141 -27
  37. package/src/machine/auth_otp_v2.js +10 -4
  38. package/src/machine/auth_otp_v3.js +11 -3
  39. package/src/machine/bank_binding.js +112 -12
  40. package/src/machine/bank_binding_amb.js +145 -0
  41. package/src/machine/common.js +113 -25
  42. package/src/machine/deposit/amb.js +92 -0
  43. package/src/machine/deposit/crypto.js +50 -29
  44. package/src/machine/deposit/crypto_bank.js +317 -0
  45. package/src/machine/deposit/crypto_bank_cash.js +287 -0
  46. package/src/machine/deposit/crypto_button.js +174 -39
  47. package/src/machine/deposit/crypto_cash.js +255 -0
  48. package/src/machine/deposit/crypto_qrcode.js +148 -0
  49. package/src/machine/deposit/crypto_qrcode_cash.js +131 -0
  50. package/src/machine/deposit/crypto_way.js +239 -0
  51. package/src/machine/deposit/crypto_way_cash.js +256 -0
  52. package/src/machine/deposit/deposit_fc.js +8 -5
  53. package/src/machine/deposit/direct.js +111 -16
  54. package/src/machine/deposit/direct_cash.js +217 -0
  55. package/src/machine/deposit/float.js +366 -0
  56. package/src/machine/deposit/index.js +43 -2
  57. package/src/machine/deposit/krway.js +151 -0
  58. package/src/machine/deposit/loadcard_cash.js +207 -0
  59. package/src/machine/deposit/loadcard_vn.js +191 -43
  60. package/src/machine/deposit/manual_cash.js +356 -0
  61. package/src/machine/deposit/manual_vn.js +182 -60
  62. package/src/machine/deposit/qrcode_cash.js +217 -0
  63. package/src/machine/deposit/qrcode_v2.js +285 -52
  64. package/src/machine/deposit/usdt.js +144 -0
  65. package/src/machine/deposit/usdt_cash.js +138 -0
  66. package/src/machine/deposit/vpay.js +359 -0
  67. package/src/machine/game_favorite_v2.js +70 -28
  68. package/src/machine/game_info.js +57 -0
  69. package/src/machine/game_search_cash.js +390 -0
  70. package/src/machine/game_search_v2.js +64 -24
  71. package/src/machine/game_v2_1.js +662 -0
  72. package/src/machine/honor_board_cash.js +63 -0
  73. package/src/machine/inbox.js +259 -34
  74. package/src/machine/index.js +24 -17
  75. package/src/machine/leaderboard.js +31 -8
  76. package/src/machine/navbar.js +57 -0
  77. package/src/machine/promotions.js +171 -0
  78. package/src/machine/reward.js +74 -7
  79. package/src/machine/reward_cash.js +219 -0
  80. package/src/machine/roulette_v2.js +276 -0
  81. package/src/machine/setting.js +5 -2
  82. package/src/machine/side_cash.js +110 -0
  83. package/src/machine/side_v2.js +33 -28
  84. package/src/machine/user_photo.js +65 -0
  85. package/src/machine/user_sign_up.js +117 -17
  86. package/src/machine/withdraw/index.js +23 -0
  87. package/src/machine/{withdraw_vn.js → withdraw/withdraw_amb.js} +146 -78
  88. package/src/machine/{withdraw_crypto.js → withdraw/withdraw_crypto.js} +220 -69
  89. package/src/machine/withdraw/withdraw_crypto2.js +540 -0
  90. package/src/machine/withdraw/withdraw_crypto_cash.js +319 -0
  91. package/src/machine/{withdraw_fc.js → withdraw/withdraw_fc.js} +2 -2
  92. package/src/machine/withdraw/withdraw_krway.js +207 -0
  93. package/src/machine/withdraw/withdraw_manual.js +595 -0
  94. package/src/machine/withdraw/withdraw_manual_cash.js +303 -0
  95. package/src/machine/withdraw/withdraw_vn.js +533 -0
  96. package/src/machine/withdraw/withdraw_vn2.js +548 -0
  97. package/src/request/request.js +10 -5
  98. package/src/util/constant.js +19 -1
  99. package/src/util/deviceToken.js +18 -8
  100. package/src/util/index.js +2 -1
  101. package/src/util/math.js +4 -0
  102. package/src/util/storage.js +22 -22
  103. package/dist/bundle.mjs +0 -18462
  104. package/rollup.config.js +0 -16
  105. package/src/machine/auth_otp.js +0 -201
  106. package/src/machine/deposit/qrcode_vn.js +0 -206
  107. package/src/machine/game.js +0 -285
  108. package/src/machine/game_favorite.js +0 -123
  109. package/src/machine/game_search.js +0 -244
  110. package/src/machine/game_v2.js +0 -356
@@ -0,0 +1,595 @@
1
+ import { assign, createMachine } from 'xstate'
2
+ import findLastIndex from 'lodash/findLastIndex.js'
3
+ import payment from '../../api/payment.js'
4
+ import user from '../../api/user.js'
5
+
6
+ export default function (request) {
7
+ const { appSecret } = request.config
8
+ return createMachine(
9
+ {
10
+ id: 'withdraw_manual',
11
+ initial: 'loading',
12
+ context: {
13
+ mode: null,
14
+ siteConfig: null,
15
+ userInfo: null,
16
+ paymentDetail: [],
17
+ bindingPaymentInfo: {},
18
+ bindingPaymentList: {},
19
+ boundBanks: [],
20
+ balance: null,
21
+ charge: null,
22
+ realAmount: null,
23
+ applyId: null,
24
+ currentBank: null,
25
+ currentWithdrawLimit: null,
26
+ targetWithdrawLimit: null,
27
+ attachmentType: null, // null | 'withdraw' | 'pool'
28
+ enableWithdrawAmount: 0,
29
+ enableWithdraw: false,
30
+ withdrawRules: [],
31
+ withdrawRule: {},
32
+ withdrawCheck: {},
33
+ amount: null,
34
+ calculation: null,
35
+
36
+ // otp
37
+ requestId: null,
38
+ status: null,
39
+ target: null,
40
+ ttl: null,
41
+ },
42
+ states: {
43
+ loading: {
44
+ invoke: {
45
+ src: 'fetchInitData',
46
+ onDone: {
47
+ target: 'pending',
48
+ actions: ['setInitData', 'preset'],
49
+ },
50
+ onError: {
51
+ target: 'fail',
52
+ },
53
+ },
54
+ },
55
+ pending: {
56
+ on: {
57
+ SET_MODE: {
58
+ target: 'fetching',
59
+ actions: 'setMode',
60
+ },
61
+ },
62
+ },
63
+ fetching: {
64
+ invoke: {
65
+ src: 'fetchWithdrawRules',
66
+ onDone: {
67
+ target: 'mode',
68
+ actions: 'updateWithdrawCondition',
69
+ },
70
+ onError: {
71
+ target: '#withdraw_manual.fail',
72
+ },
73
+ },
74
+ },
75
+ mode: {
76
+ always: [{ target: 'activity', cond: 'isActivity' }, { target: 'cash' }],
77
+ },
78
+ activity: {
79
+ initial: 'checking',
80
+ states: {
81
+ checking: {
82
+ always: [{ target: 'convertible', cond: 'isConvertible' }, { target: 'notConvertible' }],
83
+ },
84
+ notConvertible: {
85
+ on: {
86
+ GIVE_UP: {
87
+ target: 'fetchWithdrawRule',
88
+ },
89
+ },
90
+ },
91
+ fetchWithdrawRule: {
92
+ invoke: {
93
+ src: 'fetchWithdrawRulePreview',
94
+ onDone: {
95
+ target: 'giveUp',
96
+ actions: 'setWithdrawRulePreview',
97
+ },
98
+ onError: {
99
+ target: 'notConvertible',
100
+ },
101
+ },
102
+ },
103
+ giveUp: {
104
+ on: {
105
+ CONFIRM: {
106
+ target: 'givingUp',
107
+ },
108
+ BACK: {
109
+ target: 'notConvertible',
110
+ },
111
+ },
112
+ },
113
+ givingUp: {
114
+ invoke: {
115
+ src: 'giveUp',
116
+ onDone: {
117
+ target: 'gaveUp',
118
+ },
119
+ onError: {
120
+ target: 'convertible',
121
+ },
122
+ },
123
+ },
124
+ gaveUp: {},
125
+ convertible: {
126
+ on: {
127
+ SUBMIT: {
128
+ target: 'converting',
129
+ actions: 'setAttachmentType',
130
+ },
131
+ },
132
+ },
133
+ converting: {
134
+ invoke: {
135
+ src: 'convertFreeCredit',
136
+ onDone: [
137
+ {
138
+ target: '#withdraw_manual.otp',
139
+ actions: 'setOtp',
140
+ cond: 'isOtpRequired',
141
+ },
142
+ { target: 'converted' },
143
+ ],
144
+ onError: {
145
+ target: 'convertible',
146
+ },
147
+ },
148
+ },
149
+ converted: {
150
+ always: [
151
+ { target: '#withdraw_manual.cash.unbound', cond: 'isBankNotBound' },
152
+ { target: '#withdraw_manual.cash.withdrawable', cond: 'hasAttachmentType' },
153
+ ],
154
+ },
155
+ },
156
+ },
157
+ cash: {
158
+ initial: 'checking',
159
+ states: {
160
+ checking: {
161
+ always: [
162
+ { target: 'inProcessing', cond: 'haveProcessing' },
163
+ { target: 'unbound', cond: 'isBankNotBound' },
164
+ { target: 'withdrawCheck' },
165
+ ],
166
+ },
167
+ withdrawCheck: {
168
+ invoke: {
169
+ src: 'withdrawCheck',
170
+ onDone: [
171
+ {
172
+ target: 'notWithdrawMinDepositAmount',
173
+ cond: 'isNotWithdrawMinDepositAmount',
174
+ actions: assign((context, event) => {
175
+ return {
176
+ withdrawCheck: event.data,
177
+ }
178
+ }),
179
+ },
180
+ {
181
+ target: 'notWithdrawable',
182
+ cond: 'isNotWithdrawable',
183
+ },
184
+ {
185
+ target: 'withdrawable',
186
+ },
187
+ ],
188
+ onError: {
189
+ target: '#withdraw_manual.fail',
190
+ },
191
+ },
192
+ },
193
+ notWithdrawMinDepositAmount: {},
194
+ notWithdrawable: {},
195
+ unbound: {
196
+ // to bank_binding.js
197
+ },
198
+ inProcessing: {},
199
+ withdrawable: {
200
+ on: {
201
+ SET_CURRENT_BANK: {
202
+ actions: assign((context, event) => {
203
+ return {
204
+ currentBank: event.data,
205
+ }
206
+ }),
207
+ },
208
+ SET_ATTACHMENT_TYPE: {
209
+ actions: 'setAttachmentType',
210
+ },
211
+ SUBMIT: [
212
+ {
213
+ target: 'pooling',
214
+ cond: (context, event) => {
215
+ const { amount, attachmentType } = context
216
+ return attachmentType === 'pool' && amount > 0
217
+ },
218
+ },
219
+ {
220
+ target: 'submitting',
221
+ cond: 'isAvailableAmount',
222
+ },
223
+ ],
224
+ },
225
+ },
226
+ debouncing: {
227
+ after: {
228
+ 1000: [
229
+ {
230
+ target: 'calculating',
231
+ cond: 'isAvailableAmount',
232
+ },
233
+ {
234
+ target: 'withdrawable',
235
+ },
236
+ ],
237
+ },
238
+ },
239
+ calculating: {
240
+ invoke: {
241
+ src: 'fetchCalculation',
242
+ onDone: {
243
+ target: 'withdrawable',
244
+ actions: 'setCalculation',
245
+ },
246
+ onError: {
247
+ target: 'withdrawable',
248
+ },
249
+ },
250
+ },
251
+ submitting: {
252
+ invoke: {
253
+ src: 'submitWithdraw',
254
+ onDone: [
255
+ {
256
+ target: '#withdraw_manual.otp',
257
+ actions: 'setOtp',
258
+ cond: 'isOtpRequired',
259
+ },
260
+ {
261
+ target: 'submitted',
262
+ },
263
+ ],
264
+ onError: {
265
+ target: 'withdrawable',
266
+ },
267
+ },
268
+ },
269
+ submitted: {
270
+ entry: assign((context, event) => {
271
+ const { applyId, balance, realAmount, charge } = event.data
272
+ return { applyId, balance, realAmount, charge }
273
+ }),
274
+ invoke: {
275
+ src: 'fetchPaymentData',
276
+ onDone: {
277
+ target: 'inProcessing',
278
+ actions: 'setPaymentData',
279
+ },
280
+ onError: {
281
+ target: '#withdraw_manual.fail',
282
+ },
283
+ },
284
+ },
285
+ pooling: {
286
+ invoke: {
287
+ src: 'pool',
288
+ onDone: { target: 'pooled' },
289
+ onError: {
290
+ target: 'withdrawable',
291
+ },
292
+ },
293
+ },
294
+ pooled: {},
295
+ },
296
+ on: {
297
+ SET_AMOUNT: {
298
+ actions: ['setAmount', 'clearCalculation'],
299
+ },
300
+ CALCULATE: {
301
+ target: '.debouncing',
302
+ },
303
+ },
304
+ },
305
+ otp: {
306
+ type: 'parallel',
307
+ states: {
308
+ countdown: {
309
+ after: {
310
+ 1000: {
311
+ target: 'countdown',
312
+ actions: 'decreaseTtl',
313
+ cond: (context) => context.ttl > 0,
314
+ },
315
+ },
316
+ },
317
+ verification: {
318
+ initial: 'idle',
319
+ states: {
320
+ idle: {
321
+ on: {
322
+ ACKNOWLEDGE: {
323
+ target: 'acknowledging',
324
+ },
325
+ RESET_OTP: {
326
+ target: 'reset',
327
+ },
328
+ BACK: [
329
+ {
330
+ target: '#withdraw_manual.activity.convertible',
331
+ cond: 'isActivity',
332
+ },
333
+ {
334
+ target: '#withdraw_manual.cash.withdrawable',
335
+ },
336
+ ],
337
+ },
338
+ },
339
+ acknowledging: {
340
+ invoke: {
341
+ src: 'acknowledge',
342
+ onDone: [
343
+ {
344
+ target: '#withdraw_manual.activity.converted',
345
+ cond: 'isActivity',
346
+ },
347
+ {
348
+ target: '#withdraw_manual.cash.submitted',
349
+ },
350
+ ],
351
+ onError: {
352
+ target: 'idle',
353
+ },
354
+ },
355
+ },
356
+ reset: {
357
+ invoke: {
358
+ src: 'resetOtp',
359
+ onDone: {
360
+ target: 'idle',
361
+ actions: 'setVerificationData',
362
+ },
363
+ onError: { target: 'idle' },
364
+ },
365
+ },
366
+ },
367
+ },
368
+ },
369
+ },
370
+ fail: {},
371
+ },
372
+ on: {
373
+ REFRESH: {
374
+ target: 'loading',
375
+ },
376
+ },
377
+ },
378
+ {
379
+ actions: {
380
+ setInitData: assign((context, event) => {
381
+ const { bindingPaymentList = {}, bindingPaymentInfo = {} } = event.data
382
+ const toBeUsed = ['bankList', 'cryptoList', 'ewalletList']
383
+ const copiedBindingPaymentInfo = JSON.parse(JSON.stringify(bindingPaymentInfo))
384
+ const filterTypes = Object.keys(copiedBindingPaymentInfo).filter((type) => toBeUsed.includes(type))
385
+
386
+ let combinedData = []
387
+ filterTypes.forEach((type) => {
388
+ combinedData = combinedData.concat(copiedBindingPaymentInfo[type])
389
+ })
390
+ return { bindingPaymentList, bindingPaymentInfo, boundBanks: combinedData, currentBank: combinedData[0] }
391
+ }),
392
+ preset: assign((context, event) => {
393
+ const { siteConfig } = context
394
+ return {
395
+ attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
396
+ }
397
+ }),
398
+ setMode: assign((context, event) => {
399
+ return {
400
+ mode: event.data,
401
+ }
402
+ }),
403
+ updateWithdrawCondition: assign((context, event) => {
404
+ const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance } = event.data
405
+ const withdrawRules = event.data?.rules || []
406
+ const rules = withdrawRules.filter((rule) => rule.maxWithdrawAmount > 0)
407
+ const lastMatchedIndex = findLastIndex(rules, (rule) => balance >= rule.greaterEqualThen)
408
+
409
+ let maxWithdrawAmount = 0
410
+
411
+ if (lastMatchedIndex > -1) {
412
+ rules[lastMatchedIndex].match = true
413
+ maxWithdrawAmount = rules[lastMatchedIndex].maxWithdrawAmount
414
+ } else if (rules.length > 0) {
415
+ maxWithdrawAmount = rules[0].maxWithdrawAmount
416
+ } else {
417
+ maxWithdrawAmount = balance
418
+ }
419
+
420
+ return {
421
+ balance,
422
+ currentWithdrawLimit,
423
+ targetWithdrawLimit,
424
+ maxWithdrawAmount,
425
+ enableWithdrawAmount: +enableWithdrawAmount,
426
+ enableWithdraw,
427
+ withdrawRules,
428
+ }
429
+ }),
430
+ setWithdrawRulePreview: assign((context, event) => {
431
+ return {
432
+ withdrawRule: event.data,
433
+ }
434
+ }),
435
+ setPaymentData: assign((context, event) => {
436
+ const { paymentDetail } = event.data
437
+ return { paymentDetail }
438
+ }),
439
+ setOtp: assign((context, event) => {
440
+ const { requestId, status, target, ttl } = event.data
441
+ return {
442
+ requestId,
443
+ status,
444
+ target,
445
+ ttl,
446
+ }
447
+ }),
448
+ decreaseTtl: assign((context, evnet) => {
449
+ const second = context.ttl
450
+ return {
451
+ ttl: Math.max(second - 1, 0),
452
+ }
453
+ }),
454
+ setVerificationData: assign((context, event) => {
455
+ const { requestId, ttl, target } = event.data
456
+ return {
457
+ requestId,
458
+ ttl,
459
+ target,
460
+ }
461
+ }),
462
+ setAttachmentType: assign((context, event) => {
463
+ return {
464
+ attachmentType: event.data,
465
+ }
466
+ }),
467
+ setCalculation: assign((context, event) => {
468
+ return {
469
+ calculation: event.data,
470
+ }
471
+ }),
472
+ clearCalculation: assign((context, event) => {
473
+ return {
474
+ calculation: null,
475
+ }
476
+ }),
477
+ setAmount: assign((context, event) => {
478
+ return {
479
+ amount: event.data,
480
+ }
481
+ }),
482
+ },
483
+ guards: {
484
+ isAvailableAmount: (context, event) => {
485
+ const { paymentDetail, currentBank, amount, userInfo } = context
486
+ const { minimum = 0, maximum = 0 } = paymentDetail?.[0] || {}
487
+ const { balance = 0 } = userInfo || {}
488
+ const lastMax = Math.min(parseFloat(balance), maximum)
489
+ return !!currentBank && amount > 0 && minimum <= amount && amount <= lastMax
490
+ },
491
+ isActivity: (context, event) => {
492
+ return context.mode === 'ACTIVITY'
493
+ },
494
+ hasAttachmentType: (context, event) => {
495
+ return ['withdraw', 'pool'].includes(context.attachmentType)
496
+ },
497
+ haveProcessing: (context, event) => {
498
+ return (context.paymentDetail?.[0]?.processing || []).length > 0
499
+ },
500
+ isBankNotBound: (context, event) => {
501
+ return !context.boundBanks?.length
502
+ },
503
+ isConvertible: (context, event) => {
504
+ const { enableWithdraw } = context
505
+ return enableWithdraw
506
+ },
507
+ isNotWithdrawable: (context, event) => {
508
+ const { balance, enableWithdraw, paymentDetail } = context
509
+ const minWithdrawAmount = paymentDetail[0]?.minimum || 0
510
+ return !enableWithdraw || balance < minWithdrawAmount
511
+ },
512
+ isOtpRequired: (context, event) => {
513
+ return event.data?.status === 'otp-verifying'
514
+ },
515
+ isNotWithdrawMinDepositAmount: (context, event) => {
516
+ return !event.data?.enableWithdraw
517
+ },
518
+ },
519
+ services: {
520
+ fetchInitData: async (context, event) => {
521
+ const [bindingPaymentList = {}, bindingPaymentInfo = {}] = await Promise.all([
522
+ request.send(payment.getBindingPaymentList({ appSecret })),
523
+ request.send(payment.getBindingPaymentInfo({ appSecret })),
524
+ ])
525
+ return { bindingPaymentList, bindingPaymentInfo }
526
+ },
527
+ fetchPaymentData: async (context, event) => {
528
+ const paymentDetail = await request.send(payment.getPaymentDetail({ transferType: 'WITHDRAW' }))
529
+ return { paymentDetail }
530
+ },
531
+ fetchWithdrawRules: async (context, event) => {
532
+ const { mode } = context
533
+ return await request.send(payment.getDoubleWalletWithdrawRule({ walletType: mode }))
534
+ },
535
+ fetchWithdrawRulePreview: async (context, event) => {
536
+ const data = await request.send(payment.getWithdrawRulePreview({ applyType: 'giveup' }))
537
+ return data
538
+ },
539
+ fetchCalculation: async (context, event) => {
540
+ const { paymentDetail, currentBank, amount } = context
541
+ const { method } = paymentDetail?.[0] || {}
542
+ const { cryptoCurrency } = currentBank || {}
543
+ return await request.send(payment.getCryptoWithdrawExpectedResult({ method, amount, cryptoCurrency }))
544
+ },
545
+ submitWithdraw: async (context, event) => {
546
+ const { currentBank, amount } = context
547
+ const { method } = context.paymentDetail[0]
548
+ const { bindingType } = currentBank || {}
549
+
550
+ let branchTemp = ''
551
+ if (bindingType === 'BANK' && !['GCASH', 'PAYM', 'PIX'].includes(currentBank.bankCode)) {
552
+ branchTemp = currentBank.branch
553
+ }
554
+
555
+ return await request.send(
556
+ payment.submitWithdrawTransactionManual({
557
+ method,
558
+ amount,
559
+ applyerBankCode: currentBank.bankCode,
560
+ applyerAccountNumber: currentBank.accountNumber,
561
+ applyerIfscCode: currentBank.ifscCode,
562
+ branch: branchTemp,
563
+ holderName: currentBank.holderName,
564
+ cryptoCurrency: currentBank.cryptoCurrency,
565
+ cryptoNetwork: currentBank.cryptoNetwork,
566
+ targetAddress: currentBank.cryptoAddress,
567
+ })
568
+ )
569
+ },
570
+ convertFreeCredit: async (context, event) => {
571
+ return await request.send(payment.convertFreeCredit({ exchangeType: 1 }))
572
+ },
573
+ resetOtp: async (context, event) => {
574
+ const { requestId, target } = context
575
+ return await request.send(user.otpReset({ requestId, target }))
576
+ },
577
+ acknowledge: async (context, event) => {
578
+ const { requestId, target } = context
579
+ const code = event.data
580
+ return await request.send(user.otpAcknowledge({ requestId, target, code }))
581
+ },
582
+ pool: async (context, event) => {
583
+ const { amount } = context
584
+ return await request.send(payment.restore({ amount }))
585
+ },
586
+ giveUp: async (context, event) => {
587
+ return await request.send(payment.giveUp())
588
+ },
589
+ withdrawCheck: async (context, event) => {
590
+ return await request.send(payment.withdrawCheck())
591
+ },
592
+ },
593
+ }
594
+ )
595
+ }