@jetthai/cuora 1.1.450 → 1.1.451-dev.2
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/.claude/commands/auto-git-flow.md +5 -12
- package/.claude/commands/commit-push.md +15 -4
- package/.claude/commands/sync-ai-prompts.md +88 -1
- package/.claude/settings.local.json +3 -1
- package/.github/copilot-instructions.md +553 -395
- package/.husky/post-checkout +3 -3
- package/.husky/pre-push +1 -1
- package/.prettierignore +2 -1
- package/AGENTS.md +553 -395
- package/AI_PROMPT_SOURCE.md +664 -126
- package/CHANGELOG.md +273 -28
- package/CLAUDE.md +553 -395
- package/GEMINI.md +553 -395
- package/README.md +40 -137
- package/package.json +1 -1
- package/scripts/auto-version.js +1 -0
- package/src/api/payment.js +1 -1
- package/src/api/user.js +12 -0
- package/src/machine/auth_otp_v3.js +11 -4
- package/src/machine/deposit/crypto_bank_cash.js +8 -4
- package/src/machine/deposit/crypto_way_cash.js +6 -2
- package/src/machine/deposit/direct_cash.js +8 -0
- package/src/machine/deposit/loadcard_cash.js +9 -5
- package/src/machine/deposit/manual_cash.js +11 -1
- package/src/machine/deposit/qrcode_cash.js +7 -4
- package/src/machine/deposit/virtual_bank_cash.js +7 -1
- package/src/machine/user_sign_up.js +42 -4
- package/src/request/request.js +3 -1
|
@@ -2,6 +2,20 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import auth from '../api/auth.js'
|
|
3
3
|
import storage from '../util/storage.js'
|
|
4
4
|
|
|
5
|
+
// 註冊強制綁定多型出款:轉發各綁定型別欄位(BANK / CRYPTO / EWALLET),只帶有值的欄位
|
|
6
|
+
const BIND_FIELDS = [
|
|
7
|
+
'bindingType',
|
|
8
|
+
'cryptoCurrency',
|
|
9
|
+
'cryptoNetwork',
|
|
10
|
+
'cryptoAddress',
|
|
11
|
+
'walletCode',
|
|
12
|
+
'ifscCode',
|
|
13
|
+
'pixType',
|
|
14
|
+
'firstNameLocale',
|
|
15
|
+
'lastNameLocale',
|
|
16
|
+
]
|
|
17
|
+
const pickBindData = (data = {}) => BIND_FIELDS.reduce((acc, key) => (data[key] !== undefined ? { ...acc, [key]: data[key] } : acc), {})
|
|
18
|
+
|
|
5
19
|
export default function (request) {
|
|
6
20
|
const { sentry } = request.config
|
|
7
21
|
return createMachine(
|
|
@@ -72,11 +86,27 @@ export default function (request) {
|
|
|
72
86
|
return { fc }
|
|
73
87
|
}),
|
|
74
88
|
setSignUpId: assign((context, event) => {
|
|
75
|
-
const {
|
|
76
|
-
|
|
89
|
+
const {
|
|
90
|
+
email,
|
|
91
|
+
username,
|
|
92
|
+
nick_name,
|
|
93
|
+
password,
|
|
94
|
+
countryCode,
|
|
95
|
+
phone,
|
|
96
|
+
bankCode,
|
|
97
|
+
bankAccount,
|
|
98
|
+
holderName,
|
|
99
|
+
branch,
|
|
100
|
+
branchCode,
|
|
101
|
+
affiliateCode,
|
|
102
|
+
birthday,
|
|
103
|
+
} = event.data
|
|
77
104
|
return {
|
|
78
105
|
signUpData: {
|
|
79
106
|
provider: 'local',
|
|
107
|
+
birthday,
|
|
108
|
+
...pickBindData(event.data),
|
|
109
|
+
birthday,
|
|
80
110
|
email,
|
|
81
111
|
username,
|
|
82
112
|
nick_name,
|
|
@@ -93,10 +123,14 @@ export default function (request) {
|
|
|
93
123
|
}
|
|
94
124
|
}),
|
|
95
125
|
setSignUpPhone: assign((context, event) => {
|
|
96
|
-
const { email, countryCode, phone, nick_name, password, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } =
|
|
126
|
+
const { email, countryCode, phone, nick_name, password, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode, birthday } =
|
|
127
|
+
event.data
|
|
97
128
|
return {
|
|
98
129
|
signUpData: {
|
|
99
130
|
provider: 'phone',
|
|
131
|
+
birthday,
|
|
132
|
+
...pickBindData(event.data),
|
|
133
|
+
birthday,
|
|
100
134
|
email,
|
|
101
135
|
countryCode,
|
|
102
136
|
phone,
|
|
@@ -112,10 +146,14 @@ export default function (request) {
|
|
|
112
146
|
}
|
|
113
147
|
}),
|
|
114
148
|
setSignUpEmail: assign((context, event) => {
|
|
115
|
-
const { email, nick_name, password, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode, countryCode, phone } =
|
|
149
|
+
const { email, nick_name, password, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode, countryCode, phone, birthday } =
|
|
150
|
+
event.data
|
|
116
151
|
return {
|
|
117
152
|
signUpData: {
|
|
118
153
|
provider: 'email',
|
|
154
|
+
birthday,
|
|
155
|
+
...pickBindData(event.data),
|
|
156
|
+
birthday,
|
|
119
157
|
email,
|
|
120
158
|
nick_name,
|
|
121
159
|
password,
|
package/src/request/request.js
CHANGED
|
@@ -254,7 +254,7 @@ export default class Request {
|
|
|
254
254
|
// reject → onError → leaving → 乾淨登出,且一樣不送網路 → 洪水照止
|
|
255
255
|
if (!req.isPublic && !this.getToken()) return Promise.reject({ code: 'ERR_A103' })
|
|
256
256
|
|
|
257
|
-
const cancelToken = customToken
|
|
257
|
+
const cancelToken = customToken
|
|
258
258
|
|
|
259
259
|
// ERR_A103 No token provided 改由後端回傳:不再於送出前自行 throw,
|
|
260
260
|
const requestConfig = this._createConfig(req, cancelToken)
|
|
@@ -283,6 +283,8 @@ export default class Request {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
// 注意:send() 已不再預設附加 this.source.token(見 send 內註解),
|
|
287
|
+
// sourceUpdate 僅對「呼叫端明確以 this.source.token 為 customToken」的請求有效;保留以維持 API 相容。
|
|
286
288
|
sourceUpdate() {
|
|
287
289
|
this.source.cancel('Requests Cancelled')
|
|
288
290
|
this.source = this.axios.CancelToken.source()
|