@jetthai/cuora 1.1.394-dev-8 → 1.1.395-payment-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 (68) hide show
  1. package/CHANGELOG.md +1 -125
  2. package/package.json +1 -1
  3. package/resetGitBranch.sh +10 -0
  4. package/src/api/activity.js +4 -6
  5. package/src/api/auth.js +2 -2
  6. package/src/api/common.js +1 -6
  7. package/src/api/game.js +13 -25
  8. package/src/api/index.js +1 -3
  9. package/src/api/payment.js +5 -9
  10. package/src/api/ranking.js +6 -6
  11. package/src/api/user.js +10 -15
  12. package/src/lib/{fingerprint_v3_11_12.js → fingerprint_v3_11_5.js} +4205 -3742
  13. package/src/machine/activity/continue_deposit_activity.js +1 -2
  14. package/src/machine/activity/fafafa_activity.js +5 -39
  15. package/src/machine/activity/return_bonus_activity.js +1 -2
  16. package/src/machine/activity/roulette_activity_v2.js +0 -5
  17. package/src/machine/activity/sign_in_activity.js +1 -2
  18. package/src/machine/activity/specify_bets_activity.js +1 -2
  19. package/src/machine/activity/specify_turnover_activity.js +1 -2
  20. package/src/machine/auth.js +7 -13
  21. package/src/machine/auth_otp_v3.js +11 -42
  22. package/src/machine/bank_binding.js +10 -67
  23. package/src/machine/common.js +9 -47
  24. package/src/machine/deposit/amb.js +1 -1
  25. package/src/machine/deposit/crypto_bank.js +2 -10
  26. package/src/machine/deposit/crypto_bank_cash.js +2 -10
  27. package/src/machine/deposit/crypto_way.js +2 -10
  28. package/src/machine/deposit/crypto_way_cash.js +2 -10
  29. package/src/machine/deposit/deposit_fc.js +3 -11
  30. package/src/machine/deposit/direct.js +4 -12
  31. package/src/machine/deposit/direct_cash.js +4 -12
  32. package/src/machine/deposit/float.js +4 -12
  33. package/src/machine/deposit/loadcard_cash.js +3 -11
  34. package/src/machine/deposit/loadcard_vn.js +3 -11
  35. package/src/machine/deposit/manual_cash.js +4 -12
  36. package/src/machine/deposit/manual_vn.js +3 -11
  37. package/src/machine/deposit/qrcode_cash.js +3 -11
  38. package/src/machine/deposit/qrcode_v2.js +3 -11
  39. package/src/machine/deposit/virtual_bank_cash.js +3 -11
  40. package/src/machine/deposit/virtual_bank_vn.js +3 -11
  41. package/src/machine/deposit/vpay.js +4 -12
  42. package/src/machine/game_replay.js +2 -2
  43. package/src/machine/game_search_cash.js +7 -10
  44. package/src/machine/game_search_v2.js +10 -10
  45. package/src/machine/game_v2_1.js +13 -27
  46. package/src/machine/honor_board_cash.js +1 -1
  47. package/src/machine/inbox.js +8 -22
  48. package/src/machine/index.js +0 -2
  49. package/src/machine/ranking.js +11 -14
  50. package/src/machine/reward.js +5 -58
  51. package/src/machine/reward_cash.js +3 -60
  52. package/src/machine/reward_fc.js +1 -2
  53. package/src/machine/roulette_v2.js +0 -4
  54. package/src/machine/side_cash.js +2 -3
  55. package/src/machine/side_v2.js +4 -5
  56. package/src/machine/user_reset_password.js +4 -5
  57. package/src/machine/user_sign_up.js +2 -6
  58. package/src/machine/vip_table.js +4 -11
  59. package/src/machine/withdraw/withdraw_crypto_cash.js +2 -10
  60. package/src/machine/withdraw/withdraw_manual.js +96 -11
  61. package/src/machine/withdraw/withdraw_manual_cash.js +1 -1
  62. package/src/request/request.js +7 -258
  63. package/src/util/deviceToken.js +2 -26
  64. package/src/util/index.js +2 -2
  65. package/src/util/storage.js +4 -18
  66. package/src/api/account.js +0 -8
  67. package/src/api/otp.js +0 -5
  68. package/src/machine/game_betslip.js +0 -46
@@ -1,12 +1,6 @@
1
1
  export default {
2
2
  get(name, options) {
3
- let itemStr = null
4
- try {
5
- itemStr = localStorage.getItem(name)
6
- } catch (error) {
7
- console.error(`Error getting item from localStorage: ${error}`)
8
- return null
9
- }
3
+ const itemStr = localStorage.getItem(name)
10
4
 
11
5
  if (!itemStr) {
12
6
  return null
@@ -18,7 +12,7 @@ export default {
18
12
  return null
19
13
  }
20
14
 
21
- return 'value' in item ? item.value : item
15
+ return item.value
22
16
  },
23
17
  set(name, value, options) {
24
18
  const item = { value }
@@ -26,17 +20,9 @@ export default {
26
20
  if (options?.maxAge) {
27
21
  item.expiry = new Date().getTime() + options.maxAge * 1000
28
22
  }
29
- try {
30
- localStorage.setItem(name, JSON.stringify(item))
31
- } catch (error) {
32
- console.error(`Error setting item in localStorage: ${error}`)
33
- }
23
+ localStorage.setItem(name, JSON.stringify(item))
34
24
  },
35
25
  remove(name, options) {
36
- try {
37
- localStorage.removeItem(name)
38
- } catch (error) {
39
- console.error(`Error removing item from localStorage: ${error}`)
40
- }
26
+ localStorage.removeItem(name)
41
27
  },
42
28
  }
@@ -1,8 +0,0 @@
1
- export default {
2
- bindingStatus: () => ({ url: 'account-binding/status', method: 'GET' }),
3
- applyBinding: (data) => ({ url: 'account-binding/bind', method: 'POST', params: data }),
4
- bindingVerification: (data) => ({ url: 'account-binding/acknowledge', method: 'POST', params: data }),
5
- bindThirdParty: (data) => ({ url: 'account-binding/bind-third-party', method: 'GET', params: data }),
6
- bindPassword: (data) => ({ url: 'account-binding/bind-password', method: 'POST', params: data }),
7
- resetOtp: (data) => ({ url: 'account-binding/reset-otp', method: 'POST', params: data }),
8
- }
package/src/api/otp.js DELETED
@@ -1,5 +0,0 @@
1
- export default {
2
- verification: (data) => ({ url: 'otp-verification-point/verify', method: 'POST', params: data }),
3
- acknowledge: (data) => ({ url: 'otp-verification-point/acknowledge', method: 'POST', params: data }),
4
- reset: (data) => ({ url: 'otp-verification-point/reset-otp', method: 'POST', params: data }),
5
- }
@@ -1,46 +0,0 @@
1
- import { assign, createMachine } from 'xstate'
2
- import game from '../api/game.js'
3
-
4
- export default function (request, context) {
5
- const { appSecret } = request.config
6
- const { providerId, seqNo, lang } = context
7
- return createMachine(
8
- {
9
- id: 'game_betslip',
10
- initial: 'fetching',
11
- context: {
12
- gameBetSlip: {},
13
- },
14
- states: {
15
- fetching: {
16
- invoke: {
17
- src: 'fetchBetslip',
18
- onDone: {
19
- target: 'idle',
20
- actions: 'setBetslip',
21
- },
22
- onError: {
23
- target: 'idle',
24
- },
25
- },
26
- },
27
- idle: {},
28
- },
29
- },
30
- {
31
- actions: {
32
- setBetslip: assign((context, event) => {
33
- return {
34
- gameBetSlip: event.data,
35
- }
36
- }),
37
- },
38
- services: {
39
- // 取得遊戲注單
40
- fetchBetslip: async (context, event) => {
41
- return await request.send(game.getBetslip({ providerId, seqNo, lang, appSecret }))
42
- },
43
- },
44
- }
45
- )
46
- }