@jetthai/cuora 1.1.110 → 1.1.112-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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
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
|
+
### [1.1.112](https://github.com/jetthai/cuora-module/compare/v1.1.104-1...v1.1.112) (2023-05-31)
|
|
8
|
+
|
|
9
|
+
### [1.1.111](https://github.com/jetthai/cuora-module/compare/v1.1.110...v1.1.111) (2023-05-30)
|
|
10
|
+
|
|
11
|
+
### [1.1.110](https://github.com/jetthai/cuora-module/compare/v1.1.109...v1.1.110) (2023-05-30)
|
|
12
|
+
|
|
13
|
+
### [1.1.109](https://github.com/jetthai/cuora-module/compare/v1.1.108...v1.1.109) (2023-05-30)
|
|
14
|
+
|
|
15
|
+
### [1.1.108](https://github.com/jetthai/cuora-module/compare/v1.1.107...v1.1.108) (2023-05-30)
|
|
16
|
+
|
|
17
|
+
### [1.1.107](https://github.com/jetthai/cuora-module/compare/v1.1.106...v1.1.107) (2023-05-30)
|
|
18
|
+
|
|
19
|
+
### [1.1.106](https://github.com/jetthai/cuora-module/compare/v1.1.105...v1.1.106) (2023-05-29)
|
|
20
|
+
|
|
21
|
+
### [1.1.105](https://github.com/jetthai/cuora-module/compare/v1.1.104...v1.1.105) (2023-05-29)
|
|
22
|
+
|
|
23
|
+
### [1.1.111](https://github.com/jetthai/cuora-module/compare/v1.1.110...v1.1.111) (2023-05-30)
|
|
24
|
+
|
|
5
25
|
### [1.1.110](https://github.com/jetthai/cuora-module/compare/v1.1.109...v1.1.110) (2023-05-30)
|
|
6
26
|
|
|
7
27
|
### [1.1.109](https://github.com/jetthai/cuora-module/compare/v1.1.108...v1.1.109) (2023-05-30)
|
package/package.json
CHANGED
package/src/machine/auth.js
CHANGED
package/src/machine/reward.js
CHANGED
|
@@ -90,10 +90,7 @@ export default function (request) {
|
|
|
90
90
|
receiving: {
|
|
91
91
|
invoke: {
|
|
92
92
|
src: 'receiveReward',
|
|
93
|
-
onDone: {
|
|
94
|
-
target: 'received',
|
|
95
|
-
actions: [send({ type: 'REFRESH' }), 'doCallback'],
|
|
96
|
-
},
|
|
93
|
+
onDone: [{ actions: send({ type: 'REFRESH' }) }, { target: 'idle', cond: 'isPrize' }, { target: 'idle', actions: 'doCallback' }],
|
|
97
94
|
onError: {
|
|
98
95
|
target: 'idle',
|
|
99
96
|
},
|
|
@@ -152,11 +149,16 @@ export default function (request) {
|
|
|
152
149
|
}
|
|
153
150
|
}),
|
|
154
151
|
},
|
|
152
|
+
guards: {
|
|
153
|
+
isPrize: (context, event) => {
|
|
154
|
+
return event.data?.rewardType === 'PRIZE'
|
|
155
|
+
},
|
|
156
|
+
},
|
|
155
157
|
services: {
|
|
156
158
|
fetchRewardList: async (context, event) => {
|
|
157
159
|
const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
|
|
158
160
|
const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret }))
|
|
159
|
-
const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE', count: 30, appSecret }))
|
|
161
|
+
const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret }))
|
|
160
162
|
const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
|
|
161
163
|
return [otherRewardList, pointsRewardList, rewardList]
|
|
162
164
|
},
|
|
@@ -246,7 +246,7 @@ export default function (request, context) {
|
|
|
246
246
|
},
|
|
247
247
|
submitWithdraw: async (context, event) => {
|
|
248
248
|
const { currentPayment, selectedUserBank, selectedAmount } = context
|
|
249
|
-
const branchTemp = ['GCASH', 'PAYM'].includes(selectedUserBank.bankCode) ? '' : selectedUserBank.branch
|
|
249
|
+
const branchTemp = ['GCASH', 'PAYM', 'PIX'].includes(selectedUserBank.bankCode) ? '' : selectedUserBank.branch
|
|
250
250
|
return await request.send(
|
|
251
251
|
payment.submitWithdrawTransactionVN({
|
|
252
252
|
method: currentPayment.method,
|
|
@@ -461,7 +461,7 @@ export default function (request) {
|
|
|
461
461
|
submitWithdraw: async (context, event) => {
|
|
462
462
|
const { bank, amount } = context
|
|
463
463
|
const { method } = context.paymentDetail[0]
|
|
464
|
-
const branchTemp = ['GCASH', 'PAYM'].includes(bank.bankCode) ? '' : bank.branch
|
|
464
|
+
const branchTemp = ['GCASH', 'PAYM', 'PIX'].includes(bank.bankCode) ? '' : bank.branch
|
|
465
465
|
return await request.send(
|
|
466
466
|
payment.submitWithdrawTransactionVN({
|
|
467
467
|
method,
|
|
@@ -484,7 +484,7 @@ export default function (request) {
|
|
|
484
484
|
submitWithdraw: async (context, event) => {
|
|
485
485
|
const { bank, amount } = context
|
|
486
486
|
const { method } = context.paymentDetail[0]
|
|
487
|
-
const branchTemp = ['GCASH', 'PAYM'].includes(bank.bankCode) ? '' : bank.branch
|
|
487
|
+
const branchTemp = ['GCASH', 'PAYM', 'PIX'].includes(bank.bankCode) ? '' : bank.branch
|
|
488
488
|
return await request.send(
|
|
489
489
|
payment.submitWithdrawTransactionVN({
|
|
490
490
|
method,
|