@jetthai/cuora 1.1.429-dev.0 → 1.1.430-dev.0

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.430-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.431-dev.0...v1.1.430-dev.0) (2026-04-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **deposit:** 修正 crypto_way_cash inputAmount 清空時未重置狀態 ([2630a06](https://github.com/jetthai/cuora-module/commit/2630a060b0a43d27a0a727c0e0e5efe0306b2ca9))
11
+ * **deposit:** 修正 crypto_way_cash setAmount 清空時未重置狀態 ([2fc0c08](https://github.com/jetthai/cuora-module/commit/2fc0c08d3e49e321319bef27bcdb52b4491a98a0))
12
+
5
13
  ### [1.1.429-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.429-dev.0) (2026-04-14)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.429-dev.0",
3
+ "version": "1.1.430-dev.0",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -476,6 +476,9 @@ export default function (request) {
476
476
 
477
477
  const affiliateCode = storage.get('ac')
478
478
  const nickname = storage.get('nk')
479
+ const phone = storage.get('tp_phone')
480
+ const countryCode = storage.get('tp_countryCode')
481
+ const email = storage.get('tp_email')
479
482
  const messages = {
480
483
  url: window.location.href,
481
484
  channelOrders: [
@@ -497,9 +500,25 @@ export default function (request) {
497
500
  referralObj.nick_name = nickname
498
501
  }
499
502
 
503
+ if (![undefined, 'undefined', null, 'null'].includes(phone)) {
504
+ referralObj.phone = phone
505
+ }
506
+
507
+ if (![undefined, 'undefined', null, 'null'].includes(countryCode)) {
508
+ referralObj.countryCode = countryCode
509
+ }
510
+
511
+ if (![undefined, 'undefined', null, 'null'].includes(email)) {
512
+ referralObj.email = email
513
+ }
514
+
500
515
  referralObj.channel = storage.get('channel') || defaultChannel || channel
501
516
  referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
502
517
 
518
+ storage.remove('tp_phone')
519
+ storage.remove('tp_countryCode')
520
+ storage.remove('tp_email')
521
+
503
522
  const fullURL = request.config.fullURL
504
523
 
505
524
  const redirectURL = urljoin(
@@ -169,21 +169,15 @@ export default function (request, context) {
169
169
  // 現金網可自由填額度,grandTotalEnable 欄位感覺不再需要?
170
170
  if (context.selectedCrypto?.grandTotalEnable === 1) {
171
171
  // 累加模式:用 Math.max 確保累加結果不低於 0
172
- const result = preciseAdd(`${parseFloat(context.selectedAmount || 0)}`, `${parseFloat(event.data)}`)
172
+ const result = preciseAdd(`${parseFloat(context.selectedAmount || 0)}`, `${parseFloat(event.data || '0')}`)
173
173
  return {
174
174
  selectedAmount: Math.max(result, 0),
175
175
  }
176
176
  } else {
177
- // 直接設定模式:拒絕 NaN 及負數,返回空物件使 context 不變
178
- const val = parseFloat(event.data)
179
- if (isNaN(val) || val < 0) return {}
180
177
  return { selectedAmount: event.data }
181
178
  }
182
179
  }),
183
180
  inputAmount: assign((context, event) => {
184
- // 驗證輸入值:NaN 或負數時忽略此次輸入
185
- const val = parseFloat(event.data)
186
- if (isNaN(val) || val < 0) return {}
187
181
  return { selectedAmount: event.data }
188
182
  }),
189
183
  setAddress: assign((context, event) => {
@@ -130,7 +130,7 @@ export default function (request, context) {
130
130
  },
131
131
  ],
132
132
  onError: {
133
- target: 'idle',
133
+ target: '#withdraw_crypto_cash.calculated',
134
134
  },
135
135
  },
136
136
  },