@jetthai/cuora 1.1.257 → 1.1.259-auth-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,12 @@
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.259-auth-1](https://github.com/jetthai/cuora-module/compare/v1.1.259...v1.1.259-auth-1) (2024-05-08)
6
+
7
+ ### [1.1.259](https://github.com/jetthai/cuora-module/compare/v1.1.258...v1.1.259) (2024-05-07)
8
+
9
+ ### [1.1.258](https://github.com/jetthai/cuora-module/compare/v1.1.257...v1.1.258) (2024-05-07)
10
+
5
11
  ### [1.1.257](https://github.com/jetthai/cuora-module/compare/v1.1.256...v1.1.257) (2024-05-06)
6
12
 
7
13
  ### [1.1.256](https://github.com/jetthai/cuora-module/compare/v1.1.255...v1.1.256) (2024-05-03)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.257",
3
+ "version": "1.1.259-auth-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -100,7 +100,7 @@ export default function (request) {
100
100
  invoke: {
101
101
  src: 'fetchUserInfo',
102
102
  onDone: {
103
- target: 'inline',
103
+ target: 'loginSuccess',
104
104
  actions: ['setUserInfo', 'extendToken'],
105
105
  },
106
106
  onError: {
@@ -108,6 +108,13 @@ export default function (request) {
108
108
  },
109
109
  },
110
110
  },
111
+ loginSuccess: {
112
+ after: {
113
+ 0: {
114
+ target: 'tokenAuthenticated',
115
+ },
116
+ },
117
+ },
111
118
  tokenAuthenticated: {
112
119
  invoke: {
113
120
  src: 'fetchUserInfo',
@@ -146,10 +146,9 @@ export default function (request) {
146
146
  const cryptoBank = event.data.find((element) => element.category === context.currentCategory)
147
147
  const cryptos = cryptoBank.banks.map((crypto) => ({
148
148
  ...crypto,
149
- channel: cryptoBank.channel,
150
149
  label: crypto.cryptoName,
151
150
  value: cryptoBank.method,
152
- icon: cryptoBank.channel,
151
+ icon: crypto.symbol,
153
152
  }))
154
153
  const currentPayment = {
155
154
  label: cryptos[0].network,
@@ -236,7 +235,7 @@ export default function (request) {
236
235
  payment.getCryptoDepositExpectedResult({
237
236
  method: selectedCrypto.value,
238
237
  amount,
239
- cryptoCurrency: selectedCrypto.channel,
238
+ cryptoCurrency: selectedCrypto.symbol,
240
239
  promotionsNo: promotion?.activityNo,
241
240
  })
242
241
  )
@@ -247,7 +246,7 @@ export default function (request) {
247
246
  payment.submitDepositTransactionCryptoBank({
248
247
  method: selectedCrypto.value,
249
248
  amount: amount,
250
- cryptoCurrency: selectedCrypto.channel,
249
+ cryptoCurrency: selectedCrypto.symbol,
251
250
  cryptoNetwork: selectedCrypto.network,
252
251
  sourceAddress: selectedCrypto.address,
253
252
  promotionsNo: promotion?.activityNo,
@@ -120,10 +120,9 @@ export default function (request, context) {
120
120
  const cryptoBank = paymentDetail.find((element) => element.transferType === 'deposit' && element.category === context.currentCategory)
121
121
  const cryptos = cryptoBank.banks.map((crypto) => ({
122
122
  ...crypto,
123
- channel: cryptoBank.channel,
124
123
  label: crypto.cryptoName,
125
124
  value: cryptoBank.method,
126
- icon: cryptoBank.channel,
125
+ icon: crypto.symbol,
127
126
  }))
128
127
  return {
129
128
  cryptos,
@@ -205,7 +204,7 @@ export default function (request, context) {
205
204
  payment.getCryptoDepositExpectedResult({
206
205
  method: selectedCrypto.value,
207
206
  amount: selectedAmount,
208
- cryptoCurrency: selectedCrypto.channel,
207
+ cryptoCurrency: selectedCrypto.symbol,
209
208
  promotionsNo: promotion?.promotionsNo,
210
209
  })
211
210
  )
@@ -216,7 +215,7 @@ export default function (request, context) {
216
215
  payment.submitDepositTransactionCryptoBank({
217
216
  method: selectedCrypto.value,
218
217
  amount: selectedAmount,
219
- cryptoCurrency: selectedCrypto.channel,
218
+ cryptoCurrency: selectedCrypto.symbol,
220
219
  cryptoNetwork: selectedCrypto.network,
221
220
  sourceAddress: selectedCrypto.address,
222
221
  promotionsNo: promotion?.promotionsNo,