@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/CHANGELOG.md +4 -0
- package/dist/bundle.mjs +1453 -595
- package/package.json +1 -1
- package/src/machine/common.js +19 -14
- package/src/machine/deposit/deposit_fc.js +2 -2
- package/src/machine/withdraw_crypto.js +2 -2
- package/src/machine/withdraw_fc.js +2 -2
package/package.json
CHANGED
package/src/machine/common.js
CHANGED
|
@@ -150,22 +150,27 @@ export default function (request) {
|
|
|
150
150
|
}
|
|
151
151
|
}),
|
|
152
152
|
setAgent: assign((context, event) => {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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?.
|
|
139
|
+
method?.networkName.map((value, i) => {
|
|
140
140
|
return {
|
|
141
|
-
label: method?.
|
|
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?.
|
|
181
|
+
method?.networkName?.map?.((value, i) => {
|
|
182
182
|
return {
|
|
183
|
-
label: method?.
|
|
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?.
|
|
143
|
+
method?.networkName?.map?.((value, i) => {
|
|
144
144
|
return {
|
|
145
|
-
label: method?.
|
|
145
|
+
label: method?.networkOptional?.[i],
|
|
146
146
|
value,
|
|
147
147
|
icon: value,
|
|
148
148
|
}
|