@jetthai/cuora 1.0.79 → 1.0.81
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.0.81](https://github.com/jetthai/cuora-module/compare/v1.0.80...v1.0.81) (2022-01-18)
|
|
6
|
+
|
|
7
|
+
### [1.0.80](https://github.com/jetthai/cuora-module/compare/v1.0.79...v1.0.80) (2022-01-17)
|
|
8
|
+
|
|
5
9
|
### [1.0.79](https://github.com/jetthai/cuora-module/compare/v1.0.78...v1.0.79) (2022-01-14)
|
|
6
10
|
|
|
7
11
|
### [1.0.78](https://github.com/jetthai/cuora-module/compare/v1.0.77...v1.0.78) (2022-01-14)
|
package/package.json
CHANGED
package/src/machine/auth.js
CHANGED
|
@@ -127,17 +127,18 @@ export default function (request) {
|
|
|
127
127
|
actions: {
|
|
128
128
|
setCryptos: assign((context, event) => {
|
|
129
129
|
return {
|
|
130
|
-
cryptos: event.data.map((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.channel })),
|
|
130
|
+
cryptos: event.data.map((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })),
|
|
131
131
|
}
|
|
132
132
|
}),
|
|
133
133
|
setCrypto: assign((context, event) => {
|
|
134
134
|
const { cryptos, currentNetwork } = context
|
|
135
|
-
const method = cryptos.find((crypto) => crypto.
|
|
135
|
+
const method = cryptos.find((crypto) => crypto.method === event.data.value)
|
|
136
136
|
const networks =
|
|
137
137
|
method?.optional.map((value, i) => {
|
|
138
138
|
return {
|
|
139
139
|
label: method?.originalItem?.[i],
|
|
140
140
|
value,
|
|
141
|
+
icon: value,
|
|
141
142
|
}
|
|
142
143
|
}) || []
|
|
143
144
|
|
|
@@ -215,24 +216,22 @@ export default function (request) {
|
|
|
215
216
|
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
216
217
|
},
|
|
217
218
|
fetchCalculation: async (context, event) => {
|
|
218
|
-
const {
|
|
219
|
-
const method = cryptos.find((crypto) => crypto.channel === currentCrypto.value)?.method
|
|
219
|
+
const { currentCrypto, currentAmount } = context
|
|
220
220
|
return await request.send(
|
|
221
221
|
payment.getDepositExpectedResult({
|
|
222
|
-
method,
|
|
222
|
+
method: currentCrypto.method,
|
|
223
223
|
amount: currentAmount,
|
|
224
|
-
cryptoCurrency: currentCrypto.
|
|
224
|
+
cryptoCurrency: currentCrypto.channel,
|
|
225
225
|
})
|
|
226
226
|
)
|
|
227
227
|
},
|
|
228
228
|
submitDeposit: async (context, event) => {
|
|
229
|
-
const {
|
|
230
|
-
const method = cryptos.find((crypto) => crypto.channel === currentCrypto.value)?.method
|
|
229
|
+
const { currentCrypto, currentNetwork, calculatedResult } = context
|
|
231
230
|
return await request.send(
|
|
232
231
|
payment.submitDepositTransaction({
|
|
233
|
-
method,
|
|
232
|
+
method: currentCrypto.method,
|
|
234
233
|
amount: calculatedResult.actualAmount,
|
|
235
|
-
cryptoCurrency: currentCrypto.
|
|
234
|
+
cryptoCurrency: currentCrypto.channel,
|
|
236
235
|
cryptoNetwork: currentNetwork.value,
|
|
237
236
|
})
|
|
238
237
|
)
|
package/src/machine/index.js
CHANGED
|
@@ -15,11 +15,11 @@ import reward from './reward'
|
|
|
15
15
|
import setting from './setting'
|
|
16
16
|
import side from './side'
|
|
17
17
|
import side_v2 from './side_v2'
|
|
18
|
-
import withdraw from './withdraw'
|
|
19
18
|
import user_info from './user_info'
|
|
20
19
|
import user_sign_up from './user_sign_up'
|
|
21
20
|
import user_reset_password from './user_reset_password'
|
|
22
21
|
import bank_binding from './bank_binding'
|
|
22
|
+
import withdraw_fc from './withdraw_fc'
|
|
23
23
|
import withdraw_vn from './withdraw_vn'
|
|
24
24
|
import deposit from './deposit'
|
|
25
25
|
import bonus from './bonus'
|
|
@@ -43,11 +43,11 @@ export default {
|
|
|
43
43
|
setting,
|
|
44
44
|
side,
|
|
45
45
|
side_v2,
|
|
46
|
-
withdraw,
|
|
47
46
|
user_info,
|
|
48
47
|
user_sign_up,
|
|
49
48
|
user_reset_password,
|
|
50
49
|
bank_binding,
|
|
50
|
+
withdraw_fc,
|
|
51
51
|
withdraw_vn,
|
|
52
52
|
...deposit,
|
|
53
53
|
bonus,
|