@jetthai/cuora 1.1.420 → 1.1.421-qa-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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/machine/deposit/crypto_way_cash.js +20 -11
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.421-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.421-qa-1) (2026-03-16)
|
|
6
|
+
|
|
7
|
+
### [1.1.421](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.421) (2026-03-10)
|
|
8
|
+
|
|
5
9
|
### [1.1.420](https://github.com/jetthai/cuora-module/compare/v1.1.419...v1.1.420) (2026-03-10)
|
|
6
10
|
|
|
7
11
|
### [1.1.419](https://github.com/jetthai/cuora-module/compare/v1.1.418...v1.1.419) (2026-03-09)
|
package/package.json
CHANGED
|
@@ -130,19 +130,28 @@ export default function (request, context) {
|
|
|
130
130
|
setInitData: assign((context, event) => {
|
|
131
131
|
const { paymentDetail } = context
|
|
132
132
|
const payments = paymentDetail.filter((item) => item.category === context.currentCategory)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
|
|
134
|
+
// 安全地處理 networks 數組,添加空值檢查
|
|
135
|
+
const cryptos = payments.flatMap((payment) => {
|
|
136
|
+
if (!payment.networks || !Array.isArray(payment.networks)) {
|
|
137
|
+
return []
|
|
138
|
+
}
|
|
139
|
+
return payment.networks.map((network) => ({
|
|
140
|
+
...payment,
|
|
141
|
+
label: `${network.cryptoName || ''} - ${network.networkDisplayName || ''}`,
|
|
142
|
+
value: payment.method,
|
|
143
|
+
icon: payment.channel,
|
|
144
|
+
networkCode: network.networkCode,
|
|
145
|
+
}))
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
// 安全地處理空數組情況
|
|
149
|
+
const defaultCrypto = cryptos.length > 0 ? cryptos[0] : null
|
|
141
150
|
|
|
142
151
|
return {
|
|
143
152
|
cryptos,
|
|
144
|
-
selectedCrypto:
|
|
145
|
-
options:
|
|
153
|
+
selectedCrypto: defaultCrypto,
|
|
154
|
+
options: defaultCrypto?.optional || [],
|
|
146
155
|
}
|
|
147
156
|
}),
|
|
148
157
|
setCrypto: assign((context, event) => {
|
|
@@ -152,7 +161,7 @@ export default function (request, context) {
|
|
|
152
161
|
selectedCrypto: selectedCrypto,
|
|
153
162
|
selectedAmount: null,
|
|
154
163
|
calculation: null,
|
|
155
|
-
options: selectedCrypto
|
|
164
|
+
options: selectedCrypto?.optional || [],
|
|
156
165
|
}
|
|
157
166
|
}),
|
|
158
167
|
setAmount: assign((context, event) => {
|