@jetthai/cuora 1.0.136 → 1.0.138
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/package.json +1 -1
- package/src/api/payment.js +2 -0
- package/src/machine/deposit/crypto.js +7 -2
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.138](https://github.com/jetthai/cuora-module/compare/v1.0.137...v1.0.138) (2022-06-21)
|
|
6
|
+
|
|
7
|
+
### [1.0.137](https://github.com/jetthai/cuora-module/compare/v1.0.136...v1.0.137) (2022-06-20)
|
|
8
|
+
|
|
5
9
|
### [1.0.136](https://github.com/jetthai/cuora-module/compare/v1.0.135...v1.0.136) (2022-06-20)
|
|
6
10
|
|
|
7
11
|
### [1.0.135](https://github.com/jetthai/cuora-module/compare/v1.0.134...v1.0.135) (2022-06-16)
|
package/package.json
CHANGED
package/src/api/payment.js
CHANGED
|
@@ -2,6 +2,8 @@ export default {
|
|
|
2
2
|
// getPaymentHistory: () => ({ url: 'payment/history', method: 'post' }),
|
|
3
3
|
getPaymentHistory: (returnDays) => ({ url: 'payment/v2/history', method: 'post', params: { returnDays } }),
|
|
4
4
|
getSpotMarket: () => ({ url: 'payment/spotmarket', method: 'get' }),
|
|
5
|
+
getTransactionHistory: (payload) => ({ url: 'payment/v2/transactionHistory', method: 'post', params: { ...payload } }),
|
|
6
|
+
getTransactionHistoryOptions: () => ({ url: 'payment/v2/category/options', method: 'get' }),
|
|
5
7
|
// getPaymentInfo: () => ({ url: `payment/paymentInfo`, method: 'get' }),
|
|
6
8
|
getPaymentInfo: () => ({ url: `payment/v2/paymentInfo`, method: 'get' }),
|
|
7
9
|
updatePaymentInfo: ({ bankCode, branch, holderName, bankAccount, firstNameTh, lastNameTh, firstNameEn, lastNameEn, bonus, paymentProvider }) => ({
|
|
@@ -53,7 +53,7 @@ export default function (request) {
|
|
|
53
53
|
invoke: {
|
|
54
54
|
src: 'fetchCalculation',
|
|
55
55
|
onDone: {
|
|
56
|
-
target: '
|
|
56
|
+
target: 'calculated',
|
|
57
57
|
actions: 'setCalculation',
|
|
58
58
|
},
|
|
59
59
|
onError: {
|
|
@@ -61,10 +61,11 @@ export default function (request) {
|
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
calculated: {
|
|
65
65
|
on: {
|
|
66
66
|
SUBMIT: {
|
|
67
67
|
target: 'submitting',
|
|
68
|
+
cond: 'isSubmittable',
|
|
68
69
|
},
|
|
69
70
|
},
|
|
70
71
|
},
|
|
@@ -217,6 +218,10 @@ export default function (request) {
|
|
|
217
218
|
} = context
|
|
218
219
|
return selectedCrypto && selectedNetwork && amount && minimum <= +amount && +amount <= maximum
|
|
219
220
|
},
|
|
221
|
+
isSubmittable: (context, event) => {
|
|
222
|
+
const { selectedCrypto, selectedNetwork, amount, sourceAddress } = context
|
|
223
|
+
return selectedCrypto && selectedNetwork && amount && sourceAddress
|
|
224
|
+
},
|
|
220
225
|
},
|
|
221
226
|
services: {
|
|
222
227
|
fetchPayments: async (context, event) => {
|