@jetthai/cuora 1.1.232 → 1.1.234
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,14 @@
|
|
|
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.234](https://github.com/jetthai/cuora-module/compare/v1.1.233...v1.1.234) (2024-03-13)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- game search ([1184b7c](https://github.com/jetthai/cuora-module/commit/1184b7cd9fcd16f6b3273477b1232a14604efe6b))
|
|
10
|
+
|
|
11
|
+
### [1.1.233](https://github.com/jetthai/cuora-module/compare/v1.1.232...v1.1.233) (2024-03-12)
|
|
12
|
+
|
|
5
13
|
### [1.1.232](https://github.com/jetthai/cuora-module/compare/v1.1.231...v1.1.232) (2024-03-11)
|
|
6
14
|
|
|
7
15
|
### [1.1.231](https://github.com/jetthai/cuora-module/compare/v1.1.230...v1.1.231) (2024-03-05)
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default function (request) {
|
|
|
6
6
|
{
|
|
7
7
|
id: 'instant_rebate_activity',
|
|
8
8
|
context: {
|
|
9
|
-
|
|
9
|
+
enableCollectButton: false,
|
|
10
10
|
lastCollectTime: null,
|
|
11
11
|
lastEstimateTime: null,
|
|
12
12
|
collectAvailable: false,
|
|
@@ -119,8 +119,8 @@ export default function (request) {
|
|
|
119
119
|
}
|
|
120
120
|
}),
|
|
121
121
|
setInitData: assign((context, event) => {
|
|
122
|
-
const {
|
|
123
|
-
return {
|
|
122
|
+
const { enableCollectButton = false, lastCollectTime = 0, lastEstimateTime = 0 } = event.data
|
|
123
|
+
return { enableCollectButton, lastCollectTime, lastEstimateTime }
|
|
124
124
|
}),
|
|
125
125
|
setEstimateResult: assign((context, event) => {
|
|
126
126
|
const {
|
|
@@ -159,8 +159,8 @@ export default function (request) {
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
isClaimExhausted: (context, event) => {
|
|
162
|
-
const { collectAvailable, remainingCount } = context
|
|
163
|
-
return !collectAvailable &&
|
|
162
|
+
const { collectAvailable, remainingCount, dailyRedemptionLimit } = context
|
|
163
|
+
return !collectAvailable && parseInt(`${remainingCount}`) === parseInt(`${dailyRedemptionLimit}`)
|
|
164
164
|
},
|
|
165
165
|
isInsufficientAmount: (context, event) => {
|
|
166
166
|
const { collectAvailable, singleMinimumAmountReceive, rebateAmount } = context
|
|
@@ -173,11 +173,11 @@ export default function (request) {
|
|
|
173
173
|
} else {
|
|
174
174
|
combindString = rebateAmount
|
|
175
175
|
}
|
|
176
|
-
const deformatRebateAmount = parseFloat(combindString)
|
|
177
|
-
return !collectAvailable && deformatRebateAmount < singleMinimumAmountReceive
|
|
176
|
+
const deformatRebateAmount = parseFloat(`${combindString}`)
|
|
177
|
+
return !collectAvailable && deformatRebateAmount < parseFloat(`${singleMinimumAmountReceive}`)
|
|
178
178
|
},
|
|
179
179
|
isClaimEnable: (context, event) => {
|
|
180
|
-
const { collectAvailable, remainingCount, rebateAmount, singleMinimumAmountReceive } = context
|
|
180
|
+
const { collectAvailable, remainingCount, dailyRedemptionLimit, rebateAmount, singleMinimumAmountReceive } = context
|
|
181
181
|
let splitArray = rebateAmount?.split(',')
|
|
182
182
|
let combindString = '0'
|
|
183
183
|
if (splitArray?.length > 0) {
|
|
@@ -188,7 +188,11 @@ export default function (request) {
|
|
|
188
188
|
combindString = rebateAmount
|
|
189
189
|
}
|
|
190
190
|
const deformatRebateAmount = parseFloat(combindString)
|
|
191
|
-
return
|
|
191
|
+
return (
|
|
192
|
+
collectAvailable &&
|
|
193
|
+
parseInt(`${remainingCount}`) < parseInt(`${dailyRedemptionLimit}`) &&
|
|
194
|
+
deformatRebateAmount >= parseFloat(`${singleMinimumAmountReceive}`)
|
|
195
|
+
)
|
|
192
196
|
},
|
|
193
197
|
},
|
|
194
198
|
services: {
|
|
@@ -255,9 +255,9 @@ export default function (request) {
|
|
|
255
255
|
} else {
|
|
256
256
|
const { tagId, recentlyGame, youMayLike } = context
|
|
257
257
|
let gameList = []
|
|
258
|
-
if (tagId === '
|
|
258
|
+
if (tagId === 'Recently') {
|
|
259
259
|
gameList = recentlyGame
|
|
260
|
-
} else if (tagId === '
|
|
260
|
+
} else if (tagId === 'You may like') {
|
|
261
261
|
gameList = youMayLike
|
|
262
262
|
}
|
|
263
263
|
return {
|
|
@@ -323,7 +323,7 @@ export default function (request) {
|
|
|
323
323
|
guards: {
|
|
324
324
|
isRecentlyYouMayLike: (context, event) => {
|
|
325
325
|
const { tagId } = context
|
|
326
|
-
return tagId === '
|
|
326
|
+
return tagId === 'Recently' || tagId === 'You may like'
|
|
327
327
|
},
|
|
328
328
|
hasTagList: (context, event) => {
|
|
329
329
|
const { tagList } = context
|
|
@@ -368,7 +368,7 @@ export default function (request) {
|
|
|
368
368
|
isRecentlySearch,
|
|
369
369
|
} = context
|
|
370
370
|
let id = tagId
|
|
371
|
-
if (tagId === '
|
|
371
|
+
if (tagId === 'Recently' || tagId === 'You may like') {
|
|
372
372
|
id = null
|
|
373
373
|
}
|
|
374
374
|
return await request.send(
|