@jetthai/cuora 1.1.260 → 1.1.262
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.262](https://github.com/jetthai/cuora-module/compare/v1.1.261...v1.1.262) (2024-05-10)
|
|
6
|
+
|
|
7
|
+
### [1.1.261](https://github.com/jetthai/cuora-module/compare/v1.1.260...v1.1.261) (2024-05-09)
|
|
8
|
+
|
|
5
9
|
### [1.1.260](https://github.com/jetthai/cuora-module/compare/v1.1.259...v1.1.260) (2024-05-08)
|
|
6
10
|
|
|
7
11
|
### [1.1.259](https://github.com/jetthai/cuora-module/compare/v1.1.258...v1.1.259) (2024-05-07)
|
package/package.json
CHANGED
|
@@ -151,14 +151,14 @@ export default function (request) {
|
|
|
151
151
|
actions: {
|
|
152
152
|
setPayment: assign((context, event) => {
|
|
153
153
|
const cryptoBank = event.data.find((element) => element.category === context.currentCategory)
|
|
154
|
-
cryptoBank.banks = cryptoBank.banks.map((crypto) => ({
|
|
154
|
+
cryptoBank.banks = (cryptoBank.banks || []).map((crypto) => ({
|
|
155
155
|
...crypto,
|
|
156
156
|
label: crypto.cryptoName,
|
|
157
157
|
value: cryptoBank.method,
|
|
158
158
|
icon: crypto.symbol,
|
|
159
159
|
}))
|
|
160
160
|
const defaultCrypto = []
|
|
161
|
-
cryptoBank.banks
|
|
161
|
+
cryptoBank.banks?.forEach((bank) => {
|
|
162
162
|
var existingCryptoName = defaultCrypto.find((item) => {
|
|
163
163
|
return item.cryptoName === bank.cryptoName
|
|
164
164
|
})
|
|
@@ -168,11 +168,11 @@ export default function (request) {
|
|
|
168
168
|
}
|
|
169
169
|
})
|
|
170
170
|
const currentPayment = {
|
|
171
|
-
label: defaultCrypto[0]
|
|
172
|
-
value: defaultCrypto[0]
|
|
173
|
-
icon: defaultCrypto[0]
|
|
171
|
+
label: defaultCrypto[0]?.network,
|
|
172
|
+
value: defaultCrypto[0]?.network,
|
|
173
|
+
icon: defaultCrypto[0]?.network,
|
|
174
174
|
}
|
|
175
|
-
const defaultAddresses = cryptoBank.banks
|
|
175
|
+
const defaultAddresses = (cryptoBank.banks || [])
|
|
176
176
|
.filter((element) => element.cryptoName === defaultCrypto[0].cryptoName)
|
|
177
177
|
.map((value, i) => {
|
|
178
178
|
return {
|
|
@@ -188,7 +188,7 @@ export default function (request) {
|
|
|
188
188
|
cryptoBank,
|
|
189
189
|
selectedCrypto: defaultCrypto[0],
|
|
190
190
|
selectedAddress: defaultAddresses[0],
|
|
191
|
-
options: defaultCrypto[0]
|
|
191
|
+
options: defaultCrypto[0]?.optional,
|
|
192
192
|
currentPayment,
|
|
193
193
|
processing: currentPayment.processing?.[0],
|
|
194
194
|
}
|
|
@@ -126,14 +126,14 @@ export default function (request, context) {
|
|
|
126
126
|
setInitData: assign((context, event) => {
|
|
127
127
|
const { paymentDetail } = context
|
|
128
128
|
const cryptoBank = paymentDetail.find((element) => element.transferType === 'deposit' && element.category === context.currentCategory)
|
|
129
|
-
cryptoBank.banks = cryptoBank.banks.map((crypto) => ({
|
|
129
|
+
cryptoBank.banks = (cryptoBank.banks || []).map((crypto) => ({
|
|
130
130
|
...crypto,
|
|
131
131
|
label: crypto.cryptoName,
|
|
132
132
|
value: cryptoBank.method,
|
|
133
133
|
icon: crypto.symbol,
|
|
134
134
|
}))
|
|
135
135
|
const defaultCrypto = []
|
|
136
|
-
cryptoBank.banks
|
|
136
|
+
cryptoBank.banks?.forEach((bank) => {
|
|
137
137
|
var existingCryptoName = defaultCrypto.find((item) => {
|
|
138
138
|
return item.cryptoName === bank.cryptoName
|
|
139
139
|
})
|
|
@@ -142,7 +142,7 @@ export default function (request, context) {
|
|
|
142
142
|
defaultCrypto.push(bank)
|
|
143
143
|
}
|
|
144
144
|
})
|
|
145
|
-
const defaultAddresses =
|
|
145
|
+
const defaultAddresses = (cryptoBank.banks || [])
|
|
146
146
|
.filter((element) => element.cryptoName === defaultCrypto[0].cryptoName)
|
|
147
147
|
.map((value, i) => {
|
|
148
148
|
return {
|