@jetthai/cuora 1.1.73 → 1.1.74-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.73",
3
+ "version": "1.1.74-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -345,11 +345,11 @@ export default function (request) {
345
345
  const referralObj = {}
346
346
  if (![undefined, 'undefined', null, 'null'].includes(referralCode)) {
347
347
  referralObj.referralCode = referralCode
348
- } else {
349
- ;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
350
- (referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)
351
348
  }
352
349
 
350
+ referralObj.channel = storage.get('channel') || defaultChannel || channel
351
+ referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
352
+
353
353
  const redirectURL = urljoin(
354
354
  request.config.fullURL,
355
355
  'login?' +
@@ -87,9 +87,9 @@ export default function (request) {
87
87
  setPromotionsList: assign((context, event) => {
88
88
  const promotionsList = JSON.parse(JSON.stringify(event.data))
89
89
  const { noBonus, userInfo, siteConfig } = context
90
- const { withdraw_rule, balance } = userInfo
91
- const { currencyConversionLimit } = siteConfig
92
- const balanceAvailable = parseFloat(`${balance}`) < parseFloat(`${currencyConversionLimit}`)
90
+ const { withdraw_rule, balance, bank_amount } = userInfo
91
+ const { currencyConversionLimit, walletMode } = siteConfig
92
+ const balanceAvailable = parseFloat(`${walletMode === '4' ? bank_amount : balance}`) < parseFloat(`${currencyConversionLimit}`)
93
93
  const isFreeLimitRule = withdraw_rule.includes('FREE_LIMIT')
94
94
  const includesDefaultRule = withdraw_rule === 'DEFAULT' || withdraw_rule.includes('FREE_DEFAULT')
95
95
 
@@ -127,11 +127,11 @@ export default function (request) {
127
127
  const referralObj = {}
128
128
  if (![undefined, 'undefined', null, 'null'].includes(referralCode)) {
129
129
  referralObj.referralCode = referralCode
130
- } else {
131
- ;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
132
- (referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)
133
130
  }
134
131
 
132
+ referralObj.channel = storage.get('channel') || defaultChannel || channel
133
+ referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
134
+
135
135
  return await request.send(
136
136
  auth.register({
137
137
  ...signUpData,