@jetthai/cuora 1.1.94-cash → 1.1.94-cash-1

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,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.94-cash-1](https://github.com/jetthai/cuora-module/compare/v1.1.94-cash...v1.1.94-cash-1) (2023-05-11)
6
+
5
7
  ### [1.1.94-cash](https://github.com/jetthai/cuora-module/compare/v1.1.94...v1.1.94-cash) (2023-05-10)
6
8
 
7
9
  ### [1.1.93-cash](https://github.com/jetthai/cuora-module/compare/v1.1.93...v1.1.93-cash) (2023-05-09)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.94-cash",
3
+ "version": "1.1.94-cash-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -1,6 +1,5 @@
1
1
  import { assign, createMachine } from 'xstate'
2
2
  import user from '../api/user.js'
3
- import payment from '../api/payment.js'
4
3
 
5
4
  export default function (request) {
6
5
  return createMachine(
@@ -9,7 +8,6 @@ export default function (request) {
9
8
  initial: 'fetching',
10
9
  context: {
11
10
  userInfo: {},
12
- bankList: [],
13
11
  },
14
12
  states: {
15
13
  fetching: {
@@ -49,17 +47,13 @@ export default function (request) {
49
47
  actions: {
50
48
  setUserInfo: assign((context, event) => {
51
49
  return {
52
- userInfo: event.data.userInfo,
53
- bankList: event.data.bankList,
50
+ userInfo: event.data,
54
51
  }
55
52
  }),
56
53
  },
57
54
  services: {
58
55
  fetchUserInfo: async (context, event) => {
59
- const paymentDetail = await request.send(payment.getPaymentDetail({ transferType: 'WITHDRAW' }))
60
- const method = paymentDetail.find((payment) => payment.category === 'manual').method
61
- const [bankList, userInfo] = await Promise.all([request.send(payment.getBankList(method)), request.send(user.getUserInfo())])
62
- return { bankList, userInfo }
56
+ return await request.send(user.getUserInfo())
63
57
  },
64
58
  updateUserInfo: async (context, event) => {
65
59
  return await request.send(user.updateUserInfo(event.data))