@jetthai/cuora 1.0.95 → 1.0.97

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 CHANGED
@@ -2,6 +2,10 @@
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.0.97](https://github.com/jetthai/cuora-module/compare/v1.0.96...v1.0.97) (2022-03-09)
6
+
7
+ ### [1.0.96](https://github.com/jetthai/cuora-module/compare/v1.0.95...v1.0.96) (2022-03-09)
8
+
5
9
  ### [1.0.95](https://github.com/jetthai/cuora-module/compare/v1.0.94...v1.0.95) (2022-03-03)
6
10
 
7
11
  ### [1.0.94](https://github.com/jetthai/cuora-module/compare/v1.0.93...v1.0.94) (2022-03-01)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.95",
3
+ "version": "1.0.97",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -9,6 +9,7 @@ import return_bonus_activity from './return_bonus_activity'
9
9
  import specify_bets_activity from './specify_bets_activity'
10
10
  import specify_turnover_activity from './specify_turnover_activity'
11
11
  import time_bomb_activity from './time_bomb_activity'
12
+ import mini_game_activity from './mini_game_activity'
12
13
  import activity from './activity'
13
14
 
14
15
  export default {
@@ -23,5 +24,6 @@ export default {
23
24
  specify_bets_activity,
24
25
  specify_turnover_activity,
25
26
  time_bomb_activity,
27
+ mini_game_activity,
26
28
  activity,
27
29
  }
@@ -0,0 +1,62 @@
1
+ import { assign, createMachine } from 'xstate'
2
+ import api from '../../api/activity'
3
+
4
+ export default function (request) {
5
+ const { appSecret } = request.config
6
+ return createMachine(
7
+ {
8
+ id: 'mini_game_activity',
9
+ context: {
10
+ activityNo: null,
11
+ activityDetail: null,
12
+ callback: () => {},
13
+ },
14
+ initial: 'idle',
15
+ states: {
16
+ idle: {
17
+ on: {
18
+ SET_ACTIVITY_NO: {
19
+ target: 'loading',
20
+ actions: 'setActivityNo',
21
+ },
22
+ },
23
+ },
24
+ loading: {
25
+ invoke: {
26
+ src: 'fetchActivityDetail',
27
+ onDone: {
28
+ target: 'loaded',
29
+ actions: 'setActivityDetail',
30
+ },
31
+ onError: {
32
+ target: 'idle',
33
+ },
34
+ },
35
+ },
36
+ loaded: {},
37
+ },
38
+ },
39
+ {
40
+ actions: {
41
+ setActivityNo: assign((context, event) => {
42
+ return {
43
+ activityNo: event.data,
44
+ }
45
+ }),
46
+ setActivityDetail: assign((context, event) => {
47
+ return {
48
+ activityDetail: event.data,
49
+ }
50
+ }),
51
+ },
52
+ guards: {},
53
+ services: {
54
+ fetchActivityDetail: async (context, event) => {
55
+ const { activityNo } = context
56
+ const { data } = await request.send(api.getActivityDetail({ activityNo, appSecret }))
57
+ return data
58
+ },
59
+ },
60
+ }
61
+ )
62
+ }
@@ -107,7 +107,7 @@ export default function (request) {
107
107
  return await request.send(
108
108
  payment.updatePaymentInfo({
109
109
  bankCode: bank.bankCode,
110
- branch,
110
+ branch: branch === 'BLANK' ? '' : branch, // 'BLANK'會置換成空值
111
111
  bankAccount: accountNumber,
112
112
  holderName,
113
113
  })