@jetthai/cuora 1.1.238 → 1.1.240

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.240](https://github.com/jetthai/cuora-module/compare/v1.1.239...v1.1.240) (2024-03-29)
6
+
7
+ ### [1.1.239](https://github.com/jetthai/cuora-module/compare/v1.1.238...v1.1.239) (2024-03-29)
8
+
5
9
  ### [1.1.238](https://github.com/jetthai/cuora-module/compare/v1.1.237...v1.1.238) (2024-03-28)
6
10
 
7
11
  ### [1.1.237](https://github.com/jetthai/cuora-module/compare/v1.1.236...v1.1.237) (2024-03-27)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.238",
3
+ "version": "1.1.240",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -134,8 +134,11 @@ export default function (request) {
134
134
  actions: {
135
135
  setInitData: assign((context, event) => {
136
136
  const { siteConfig, paymentDetail } = event.data
137
- const cryptos = paymentDetail.map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || []
138
- const currentPayment = cryptos.find((element) => element.category === context.currentCategory)
137
+ const cryptos =
138
+ paymentDetail
139
+ .filter((element) => element.category === context.currentCategory)
140
+ .map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || []
141
+ const currentPayment = cryptos[0]
139
142
  const channels = cryptos.map((item, i) => ({ ...item, label: `Channel ${padStart(String(i + 1), 2, '0')}`, icon: 'channel' }))
140
143
  const defaultNetworks =
141
144
  cryptos[0].networkName.map((value, i) => {
@@ -249,8 +249,11 @@ export default function (request) {
249
249
  }),
250
250
  setInitData: assign((context, event) => {
251
251
  const { siteConfig, paymentDetail } = event.data
252
- const cryptos = paymentDetail?.map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || []
253
- const currentPayment = cryptos.find((element) => element.category === context.currentCategory)
252
+ const cryptos =
253
+ paymentDetail
254
+ ?.filter((element) => element.category === context.currentCategory)
255
+ ?.map((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || []
256
+ const currentPayment = cryptos[0]
254
257
  const channels = cryptos.map((item, i) => ({ ...item, label: `Channel ${padStart(String(i + 1), 2, '0')}`, icon: 'channel' }))
255
258
  const defaultNetworks =
256
259
  cryptos[0].networkName.map((value, i) => {