@jetthai/cuora 1.0.93 → 1.0.94
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,8 @@
|
|
|
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.0.94](https://github.com/jetthai/cuora-module/compare/v1.0.93...v1.0.94) (2022-03-01)
|
|
6
|
+
|
|
5
7
|
### [1.0.93](https://github.com/jetthai/cuora-module/compare/v1.0.92...v1.0.93) (2022-02-24)
|
|
6
8
|
|
|
7
9
|
### [1.0.92](https://github.com/jetthai/cuora-module/compare/v1.0.91...v1.0.92) (2022-02-17)
|
package/package.json
CHANGED
|
@@ -194,7 +194,7 @@ export default function (request) {
|
|
|
194
194
|
}
|
|
195
195
|
}),
|
|
196
196
|
setBanks: assign((context, event) => {
|
|
197
|
-
const { playerBanks } = context
|
|
197
|
+
const { playerBanks, houseBanks, selectedHouseBank } = context
|
|
198
198
|
|
|
199
199
|
const formattedPlayerBanks = playerBanks.map((bank) => {
|
|
200
200
|
bank.shortName = `${bank.bankCode} ${bank.accountNumber.slice(-5)}`
|
|
@@ -203,8 +203,16 @@ export default function (request) {
|
|
|
203
203
|
|
|
204
204
|
const banks = [...formattedPlayerBanks, ...event.data]
|
|
205
205
|
|
|
206
|
+
const newHouseBanks = houseBanks.map((houseBank) => {
|
|
207
|
+
return { ...houseBank, ...banks.find((bank) => houseBank.bankName === bank.bankCode) }
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
const newSelectedHouseBank = { ...selectedHouseBank, ...banks.find((bank) => selectedHouseBank.bankName === bank.bankCode) }
|
|
211
|
+
|
|
206
212
|
return {
|
|
207
213
|
banks,
|
|
214
|
+
houseBanks: newHouseBanks,
|
|
215
|
+
selectedHouseBank: newSelectedHouseBank,
|
|
208
216
|
selectedUserBank: banks[0],
|
|
209
217
|
userAccountNumber: banks[0].accountNumber,
|
|
210
218
|
userAccountName: banks[0].holderName,
|
|
@@ -262,7 +262,10 @@ export default function (request) {
|
|
|
262
262
|
const siteConfig = JSON.parse(window.atob(config))
|
|
263
263
|
const method = paymentDetail.find((payment) => payment.methodType === 'manual').method
|
|
264
264
|
const bankList = await request.send(payment.getBankList(method))
|
|
265
|
-
|
|
265
|
+
const newBankInfo = bankInfo.map((item) => {
|
|
266
|
+
return { ...item, ...bankList.find((bank) => bank.bankCode === item.bankCode) }
|
|
267
|
+
})
|
|
268
|
+
return { siteConfig, userInfo, paymentDetail, bonus, bankInfo: newBankInfo, bankList }
|
|
266
269
|
},
|
|
267
270
|
fetchPaymentData: async (context, event) => {
|
|
268
271
|
const paymentDetail = await request.send(payment.getPaymentDetail({ transferType: 'WITHDRAW' }))
|