@jetthai/cuora 1.1.270-fix-6 → 1.1.270-fix-8
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.1.270-fix-8](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-7...v1.1.270-fix-8) (2024-06-15)
|
|
6
|
+
|
|
7
|
+
### [1.1.270-fix-7](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-6...v1.1.270-fix-7) (2024-06-14)
|
|
8
|
+
|
|
5
9
|
### [1.1.270-fix-6](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-5...v1.1.270-fix-6) (2024-06-05)
|
|
6
10
|
|
|
7
11
|
### [1.1.270-fix-5](https://github.com/jetthai/cuora-module/compare/v1.1.270-fix-4...v1.1.270-fix-5) (2024-06-05)
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ export default function (request) {
|
|
|
13
13
|
settlementTime: null,
|
|
14
14
|
validTurnover: null,
|
|
15
15
|
rebateAmount: null,
|
|
16
|
+
rewardType: null,
|
|
16
17
|
singleMinimumAmountReceive: null,
|
|
17
18
|
remainingCount: 0,
|
|
18
19
|
dailyRedemptionLimit: 0,
|
|
@@ -129,6 +130,7 @@ export default function (request) {
|
|
|
129
130
|
settlementTime = 0,
|
|
130
131
|
validTurnover = '0',
|
|
131
132
|
rebateAmount = '0',
|
|
133
|
+
rewardType = null,
|
|
132
134
|
singleMinimumAmountReceive = 0,
|
|
133
135
|
remainingCount = 0,
|
|
134
136
|
dailyRedemptionLimit = 0,
|
|
@@ -140,6 +142,7 @@ export default function (request) {
|
|
|
140
142
|
settlementTime,
|
|
141
143
|
validTurnover,
|
|
142
144
|
rebateAmount,
|
|
145
|
+
rewardType,
|
|
143
146
|
singleMinimumAmountReceive,
|
|
144
147
|
remainingCount,
|
|
145
148
|
dailyRedemptionLimit,
|
|
@@ -152,7 +152,9 @@ export default function (request, context) {
|
|
|
152
152
|
setAmount: assign((context, event) => {
|
|
153
153
|
// 現金網可自由填額度,grandTotalEnable 欄位感覺不再需要?
|
|
154
154
|
if (context.selectedCrypto?.grandTotalEnable === 1) {
|
|
155
|
-
return {
|
|
155
|
+
return {
|
|
156
|
+
selectedAmount: preciseAdd(`${parseFloat(context.selectedAmount || 0)}`, `${parseFloat(event.data)}`),
|
|
157
|
+
}
|
|
156
158
|
} else {
|
|
157
159
|
return { selectedAmount: event.data }
|
|
158
160
|
}
|
|
@@ -240,3 +242,15 @@ export default function (request, context) {
|
|
|
240
242
|
}
|
|
241
243
|
)
|
|
242
244
|
}
|
|
245
|
+
|
|
246
|
+
function preciseAdd(a, b) {
|
|
247
|
+
let aStr = a.toString()
|
|
248
|
+
let bStr = b.toString()
|
|
249
|
+
|
|
250
|
+
let aDecimalPlaces = aStr.split('.')[1] ? aStr.split('.')[1].length : 0
|
|
251
|
+
let bDecimalPlaces = bStr.split('.')[1] ? bStr.split('.')[1].length : 0
|
|
252
|
+
|
|
253
|
+
let factor = Math.pow(10, Math.max(aDecimalPlaces, bDecimalPlaces))
|
|
254
|
+
|
|
255
|
+
return (Math.round(a * factor) + Math.round(b * factor)) / factor
|
|
256
|
+
}
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -136,6 +136,29 @@ export default function (request) {
|
|
|
136
136
|
EXIT_GAME: {
|
|
137
137
|
target: 'disconnect',
|
|
138
138
|
},
|
|
139
|
+
REFRESH: {
|
|
140
|
+
target: 'refreshing',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
refreshing: {
|
|
145
|
+
invoke: {
|
|
146
|
+
src: 'disconnectGame',
|
|
147
|
+
onDone: {
|
|
148
|
+
target: 'refreshPending',
|
|
149
|
+
actions: 'setGameURL',
|
|
150
|
+
},
|
|
151
|
+
onError: {
|
|
152
|
+
target: 'idle',
|
|
153
|
+
actions: 'setGameURL',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
refreshPending: {
|
|
158
|
+
after: {
|
|
159
|
+
500: {
|
|
160
|
+
target: 'connecting',
|
|
161
|
+
},
|
|
139
162
|
},
|
|
140
163
|
},
|
|
141
164
|
disconnect: {
|