@jetthai/cuora 1.1.112-1 → 1.1.112

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,8 +2,6 @@
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.1.112-1](https://github.com/jetthai/cuora-module/compare/v1.1.112...v1.1.112-1) (2023-05-31)
6
-
7
5
  ### [1.1.112](https://github.com/jetthai/cuora-module/compare/v1.1.104-1...v1.1.112) (2023-05-31)
8
6
 
9
7
  ### [1.1.111](https://github.com/jetthai/cuora-module/compare/v1.1.110...v1.1.111) (2023-05-30)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.112-1",
3
+ "version": "1.1.112",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -90,7 +90,10 @@ export default function (request) {
90
90
  receiving: {
91
91
  invoke: {
92
92
  src: 'receiveReward',
93
- onDone: [{ actions: send({ type: 'REFRESH' }) }, { target: 'idle', cond: 'isPrize' }, { target: 'idle', actions: 'doCallback' }],
93
+ onDone: {
94
+ target: 'received',
95
+ actions: [send({ type: 'REFRESH' }), 'doCallback'],
96
+ },
94
97
  onError: {
95
98
  target: 'idle',
96
99
  },
@@ -149,16 +152,11 @@ export default function (request) {
149
152
  }
150
153
  }),
151
154
  },
152
- guards: {
153
- isPrize: (context, event) => {
154
- return event.data?.rewardType === 'PRIZE'
155
- },
156
- },
157
155
  services: {
158
156
  fetchRewardList: async (context, event) => {
159
157
  const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
160
158
  const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret }))
161
- const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret }))
159
+ const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE', count: 30, appSecret }))
162
160
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
163
161
  return [otherRewardList, pointsRewardList, rewardList]
164
162
  },