@jetthai/cuora 1.1.182 → 1.1.183
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 +2 -0
- package/package.json +1 -1
- package/src/machine/deposit/crypto_bank_cash.js +14 -16
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.1.183](https://github.com/jetthai/cuora-module/compare/v1.1.182...v1.1.183) (2023-09-21)
|
|
6
|
+
|
|
5
7
|
### [1.1.182](https://github.com/jetthai/cuora-module/compare/v1.1.181...v1.1.182) (2023-09-21)
|
|
6
8
|
|
|
7
9
|
### [1.1.181](https://github.com/jetthai/cuora-module/compare/v1.1.180...v1.1.181) (2023-09-20)
|
package/package.json
CHANGED
|
@@ -15,7 +15,6 @@ export default function (request, context) {
|
|
|
15
15
|
|
|
16
16
|
cryptos: [],
|
|
17
17
|
networks: [],
|
|
18
|
-
sourceAddress: '',
|
|
19
18
|
options: [],
|
|
20
19
|
|
|
21
20
|
selectedCrypto: null,
|
|
@@ -81,7 +80,7 @@ export default function (request, context) {
|
|
|
81
80
|
actions: 'setResult',
|
|
82
81
|
},
|
|
83
82
|
onError: {
|
|
84
|
-
target: '
|
|
83
|
+
target: 'calculated',
|
|
85
84
|
},
|
|
86
85
|
},
|
|
87
86
|
},
|
|
@@ -103,10 +102,6 @@ export default function (request, context) {
|
|
|
103
102
|
actions: 'setNetwork',
|
|
104
103
|
internal: false,
|
|
105
104
|
},
|
|
106
|
-
SET_ADDRESS: {
|
|
107
|
-
actions: 'setAddress',
|
|
108
|
-
internal: false,
|
|
109
|
-
},
|
|
110
105
|
SET_AMOUNT: {
|
|
111
106
|
target: '.debouncing',
|
|
112
107
|
actions: 'setAmount',
|
|
@@ -117,6 +112,9 @@ export default function (request, context) {
|
|
|
117
112
|
actions: 'inputAmount',
|
|
118
113
|
internal: false,
|
|
119
114
|
},
|
|
115
|
+
SET_DEPOSIT_TIME: {
|
|
116
|
+
actions: 'setDepositTime',
|
|
117
|
+
},
|
|
120
118
|
SET_RECEIPT: {
|
|
121
119
|
actions: 'setReceipt',
|
|
122
120
|
},
|
|
@@ -182,11 +180,6 @@ export default function (request, context) {
|
|
|
182
180
|
inputAmount: assign((context, event) => {
|
|
183
181
|
return { selectedAmount: event.data }
|
|
184
182
|
}),
|
|
185
|
-
setAddress: assign((context, event) => {
|
|
186
|
-
return {
|
|
187
|
-
sourceAddress: event.data,
|
|
188
|
-
}
|
|
189
|
-
}),
|
|
190
183
|
setCalculation: assign((context, event) => {
|
|
191
184
|
return {
|
|
192
185
|
calculation: event.data,
|
|
@@ -211,6 +204,11 @@ export default function (request, context) {
|
|
|
211
204
|
calculation: null,
|
|
212
205
|
}
|
|
213
206
|
}),
|
|
207
|
+
setDepositTime: assign((context, event) => {
|
|
208
|
+
return {
|
|
209
|
+
depositTime: event.data,
|
|
210
|
+
}
|
|
211
|
+
}),
|
|
214
212
|
setReceipt: assign((context, event) => {
|
|
215
213
|
return {
|
|
216
214
|
receipt: event.data,
|
|
@@ -229,8 +227,8 @@ export default function (request, context) {
|
|
|
229
227
|
)
|
|
230
228
|
},
|
|
231
229
|
isSubmittable: (context, event) => {
|
|
232
|
-
const { selectedCrypto, selectedNetwork,
|
|
233
|
-
return selectedCrypto && selectedNetwork &&
|
|
230
|
+
const { selectedCrypto, selectedNetwork, amount, depositTime, receipt } = context
|
|
231
|
+
return selectedCrypto && selectedNetwork && amount && depositTime && receipt
|
|
234
232
|
},
|
|
235
233
|
},
|
|
236
234
|
services: {
|
|
@@ -246,15 +244,15 @@ export default function (request, context) {
|
|
|
246
244
|
)
|
|
247
245
|
},
|
|
248
246
|
submitDeposit: async (context, event) => {
|
|
249
|
-
const { selectedCrypto, selectedNetwork,
|
|
247
|
+
const { selectedCrypto, selectedNetwork, selectedAmount, promotion, depositTime, receipt } = context
|
|
250
248
|
return await request.send(
|
|
251
249
|
payment.submitDepositTransactionCrypto({
|
|
252
250
|
method: selectedCrypto.method,
|
|
253
|
-
amount:
|
|
251
|
+
amount: selectedAmount,
|
|
254
252
|
cryptoCurrency: selectedCrypto.channel,
|
|
255
253
|
cryptoNetwork: selectedNetwork.value,
|
|
256
|
-
sourceAddress: sourceAddress,
|
|
257
254
|
promotionsNo: promotion?.promotionsNo,
|
|
255
|
+
depositTime,
|
|
258
256
|
receipt,
|
|
259
257
|
})
|
|
260
258
|
)
|