@jetthai/cuora 1.0.128 → 1.0.129

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,8 @@
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.129](https://github.com/jetthai/cuora-module/compare/v1.0.128...v1.0.129) (2022-05-31)
6
+
5
7
  ### [1.0.128](https://github.com/jetthai/cuora-module/compare/v1.0.127...v1.0.128) (2022-05-27)
6
8
 
7
9
  ### [1.0.127](https://github.com/jetthai/cuora-module/compare/v1.0.125...v1.0.127) (2022-05-26)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.128",
3
+ "version": "1.0.129",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -283,14 +283,14 @@ export default function (request) {
283
283
  const redirectURL = urljoin(
284
284
  request.config.fullURL,
285
285
  'login?' +
286
- qs.stringify({
287
- provider,
288
- redirectURI: `${window.location.protocol}//${window.location.host}`,
289
- channel: cookies.get('channel') || channel || 'official',
290
- subchannel: cookies.get('subchannel') || subchannel || 'pwa',
291
- // dt,
292
- platform: 'pwa',
293
- })
286
+ qs.stringify({
287
+ provider,
288
+ redirectURI: `${window.location.protocol}//${window.location.host}`,
289
+ channel: cookies.get('channel') || channel || 'official',
290
+ subchannel: cookies.get('subchannel') || subchannel || 'pwa',
291
+ // dt,
292
+ platform: 'pwa',
293
+ })
294
294
  )
295
295
  window.location.href = redirectURL
296
296
  },
@@ -132,7 +132,6 @@ export default function (request) {
132
132
  actions: {
133
133
  setSiteConfig: assign((context, event) => {
134
134
  const { loginMethods = {}, registerMethods = {} } = event.data
135
- console.log(event.data)
136
135
  return {
137
136
  siteConfig: { ...event.data, loginMethods: pickBy(loginMethods), registerMethods: pickBy(registerMethods) },
138
137
  }
@@ -44,6 +44,10 @@ export default function (request) {
44
44
  target: 'calculable',
45
45
  actions: 'addAmount',
46
46
  },
47
+ KEY_IN: {
48
+ target: 'calculable',
49
+ actions: 'setAmount'
50
+ }
47
51
  },
48
52
  },
49
53
  fail: {},
@@ -53,6 +57,10 @@ export default function (request) {
53
57
  SELECT_AMOUNT: {
54
58
  actions: 'addAmount',
55
59
  },
60
+ KEY_IN: {
61
+ target: 'calculable',
62
+ actions: 'setAmount'
63
+ },
56
64
  CALCULATE: {
57
65
  target: 'calculating',
58
66
  },
@@ -79,6 +87,10 @@ export default function (request) {
79
87
  target: 'calculable',
80
88
  actions: 'addAmount',
81
89
  },
90
+ KEY_IN: {
91
+ target: 'calculable',
92
+ actions: 'setAmount'
93
+ },
82
94
  CONFIRM: {
83
95
  target: 'submitting',
84
96
  },
@@ -143,6 +155,9 @@ export default function (request) {
143
155
  addAmount: assign((context, event) => {
144
156
  return { selectedAmount: (context.selectedAmount || 0) + event.data }
145
157
  }),
158
+ setAmount: assign((context, event) => {
159
+ return { selectedAmount: event.data }
160
+ }),
146
161
  setCalculation: assign((context, event) => {
147
162
  return {
148
163
  calculation: event.data,
@@ -159,9 +174,6 @@ export default function (request) {
159
174
  }
160
175
  }),
161
176
  },
162
- guards: {
163
- isSubmittable: (context, event) => {},
164
- },
165
177
  services: {
166
178
  fetchInitData: async (context, event) => {
167
179
  return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
@@ -46,8 +46,8 @@ export default function (request) {
46
46
  },
47
47
  KEY_IN: {
48
48
  target: 'calculable',
49
- actions: 'setAmount',
50
- },
49
+ actions: 'setAmount'
50
+ }
51
51
  },
52
52
  },
53
53
  fail: {},
@@ -58,7 +58,7 @@ export default function (request) {
58
58
  actions: 'addAmount',
59
59
  },
60
60
  KEY_IN: {
61
- actions: 'setAmount',
61
+ actions: 'setAmount'
62
62
  },
63
63
  CALCULATE: {
64
64
  target: 'calculating',
@@ -88,7 +88,7 @@ export default function (request) {
88
88
  },
89
89
  KEY_IN: {
90
90
  target: 'calculable',
91
- actions: 'setAmount',
91
+ actions: 'setAmount'
92
92
  },
93
93
  CONFIRM: {
94
94
  target: 'submitting',
@@ -173,9 +173,6 @@ export default function (request) {
173
173
  }
174
174
  }),
175
175
  },
176
- guards: {
177
- isSubmittable: (context, event) => {},
178
- },
179
176
  services: {
180
177
  fetchInitData: async (context, event) => {
181
178
  return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
@@ -9,7 +9,7 @@ export default function (request) {
9
9
  type: 'parallel',
10
10
  context: {
11
11
  rewardList: [],
12
- callback: () => {},
12
+ callback: () => { },
13
13
  },
14
14
  states: {
15
15
  timer: {
@@ -75,7 +75,7 @@ export default function (request) {
75
75
  }),
76
76
  setCallback: assign((context, event) => {
77
77
  return {
78
- callback: event.data?.callback || (() => {}),
78
+ callback: event.data?.callback || (() => { }),
79
79
  }
80
80
  }),
81
81
  doCallback: (context, event) => {