@jetthai/cuora 1.0.173 → 1.0.175

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.173",
3
+ "version": "1.0.175",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -150,22 +150,27 @@ export default function (request) {
150
150
  }
151
151
  }),
152
152
  setAgent: assign((context, event) => {
153
- let urlParams = new URLSearchParams(window.location.search)
154
- const channel = urlParams.get('channel') || cookies.get('channel') || defaultChannel || 'official'
155
- const subchannel = urlParams.get('subchannel') || cookies.get('subchannel') || defaultSubchannel || 'pwa'
153
+ if (window.CC_JSB === true) {
154
+ // is cocos native app
155
+ return
156
+ } else {
157
+ let urlParams = new URLSearchParams(window.location.search)
158
+ const channel = urlParams.get('channel') || cookies.get('channel') || defaultChannel || 'official'
159
+ const subchannel = urlParams.get('subchannel') || cookies.get('subchannel') || defaultSubchannel || 'pwa'
156
160
 
157
- cookies.set('channel', channel, {
158
- path: '/',
159
- maxAge: 60 * 60 * 24 * 7,
160
- })
161
- cookies.set('subchannel', subchannel, {
162
- path: '/',
163
- maxAge: 60 * 60 * 24 * 7,
164
- })
161
+ cookies.set('channel', channel, {
162
+ path: '/',
163
+ maxAge: 60 * 60 * 24 * 7,
164
+ })
165
+ cookies.set('subchannel', subchannel, {
166
+ path: '/',
167
+ maxAge: 60 * 60 * 24 * 7,
168
+ })
165
169
 
166
- return {
167
- channel,
168
- subchannel,
170
+ return {
171
+ channel,
172
+ subchannel,
173
+ }
169
174
  }
170
175
  }),
171
176
  setFeeds: assign((context, event) => {
@@ -136,9 +136,9 @@ export default function (request) {
136
136
  const { cryptos, currentNetwork } = context
137
137
  const method = cryptos.find((crypto) => crypto.method === event.data.value)
138
138
  const networks =
139
- method?.optional.map((value, i) => {
139
+ method?.networkName.map((value, i) => {
140
140
  return {
141
- label: method?.originalItem?.[i],
141
+ label: method?.networkOptional?.[i],
142
142
  value,
143
143
  icon: value,
144
144
  }
@@ -178,9 +178,9 @@ export default function (request) {
178
178
  paymentDetail: event.data.paymentDetail,
179
179
  crypto: method,
180
180
  networks:
181
- method?.optional?.map?.((value, i) => {
181
+ method?.networkName?.map?.((value, i) => {
182
182
  return {
183
- label: method?.originalItem?.[i],
183
+ label: method?.networkOptional?.[i],
184
184
  value,
185
185
  icon: value,
186
186
  }
@@ -140,9 +140,9 @@ export default function (request) {
140
140
  return {
141
141
  crypto: method,
142
142
  networks:
143
- method?.optional?.map?.((value, i) => {
143
+ method?.networkName?.map?.((value, i) => {
144
144
  return {
145
- label: method?.originalItem?.[i],
145
+ label: method?.networkOptional?.[i],
146
146
  value,
147
147
  icon: value,
148
148
  }