@jetthai/cuora 1.1.50 → 1.1.52
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 +8 -0
- package/dist/bundle.mjs +18 -6
- package/package.json +1 -1
- package/src/machine/auth_otp_v2.js +10 -4
- package/src/machine/auth_otp_v3.js +7 -2
- package/src/machine/deposit/qrcode_v2.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.52](https://github.com/jetthai/cuora-module/compare/v1.1.51...v1.1.52) (2023-02-20)
|
|
6
|
+
|
|
7
|
+
### [1.1.51](https://github.com/jetthai/cuora-module/compare/v1.1.48-1...v1.1.51) (2023-02-17)
|
|
8
|
+
|
|
9
|
+
### [1.1.50](https://github.com/jetthai/cuora-module/compare/v1.1.49...v1.1.50) (2023-02-16)
|
|
10
|
+
|
|
11
|
+
### [1.1.49](https://github.com/jetthai/cuora-module/compare/v1.1.48...v1.1.49) (2023-02-15)
|
|
12
|
+
|
|
5
13
|
### [1.1.50](https://github.com/jetthai/cuora-module/compare/v1.1.49...v1.1.50) (2023-02-16)
|
|
6
14
|
|
|
7
15
|
### [1.1.49](https://github.com/jetthai/cuora-module/compare/v1.1.48...v1.1.49) (2023-02-15)
|
package/dist/bundle.mjs
CHANGED
|
@@ -17841,6 +17841,7 @@ function qrcode_v2 (request) {
|
|
|
17841
17841
|
},
|
|
17842
17842
|
],
|
|
17843
17843
|
KEY_IN: {
|
|
17844
|
+
target: 'pending',
|
|
17844
17845
|
actions: 'setAmount',
|
|
17845
17846
|
},
|
|
17846
17847
|
},
|
|
@@ -20811,10 +20812,16 @@ function auth_otp_v2 (request) {
|
|
|
20811
20812
|
otpFetching: {
|
|
20812
20813
|
invoke: {
|
|
20813
20814
|
src: 'sendOtp',
|
|
20814
|
-
onDone:
|
|
20815
|
-
|
|
20816
|
-
|
|
20817
|
-
|
|
20815
|
+
onDone: [
|
|
20816
|
+
{
|
|
20817
|
+
target: 'acknowledged',
|
|
20818
|
+
cond: (context, event) => event.data.status === 'success-verified',
|
|
20819
|
+
},
|
|
20820
|
+
{
|
|
20821
|
+
target: 'otp',
|
|
20822
|
+
actions: 'setOtpResult',
|
|
20823
|
+
},
|
|
20824
|
+
],
|
|
20818
20825
|
onError: {
|
|
20819
20826
|
target: 'idle',
|
|
20820
20827
|
},
|
|
@@ -20961,6 +20968,7 @@ function auth_otp_v3 (request) {
|
|
|
20961
20968
|
email: null,
|
|
20962
20969
|
target: null,
|
|
20963
20970
|
requestId: null,
|
|
20971
|
+
status: null,
|
|
20964
20972
|
ttl: 0,
|
|
20965
20973
|
},
|
|
20966
20974
|
states: {
|
|
@@ -21060,7 +21068,7 @@ function auth_otp_v3 (request) {
|
|
|
21060
21068
|
},
|
|
21061
21069
|
},
|
|
21062
21070
|
verification: {
|
|
21063
|
-
|
|
21071
|
+
always: [{ target: '#auth_otp.verified', cond: 'isAutoVerified' }, { target: '.idle' }],
|
|
21064
21072
|
states: {
|
|
21065
21073
|
idle: {
|
|
21066
21074
|
on: {
|
|
@@ -21119,11 +21127,12 @@ function auth_otp_v3 (request) {
|
|
|
21119
21127
|
}
|
|
21120
21128
|
}),
|
|
21121
21129
|
setVerificationData: assign((context, event) => {
|
|
21122
|
-
const { requestId, ttl, target } = event.data;
|
|
21130
|
+
const { requestId, ttl, target, status } = event.data;
|
|
21123
21131
|
return {
|
|
21124
21132
|
requestId,
|
|
21125
21133
|
ttl: ttl * 1000,
|
|
21126
21134
|
target,
|
|
21135
|
+
status,
|
|
21127
21136
|
}
|
|
21128
21137
|
}),
|
|
21129
21138
|
decreaseTtl: assign((context, evnet) => {
|
|
@@ -21170,6 +21179,9 @@ function auth_otp_v3 (request) {
|
|
|
21170
21179
|
const { error } = context;
|
|
21171
21180
|
return error.code === 'ERR_F106'
|
|
21172
21181
|
},
|
|
21182
|
+
isAutoVerified: (context, event) => {
|
|
21183
|
+
return context.status === 'success-verified'
|
|
21184
|
+
},
|
|
21173
21185
|
},
|
|
21174
21186
|
services: {
|
|
21175
21187
|
fetchUserInfo: async (context, event) => {
|
package/package.json
CHANGED
|
@@ -34,10 +34,16 @@ export default function (request) {
|
|
|
34
34
|
otpFetching: {
|
|
35
35
|
invoke: {
|
|
36
36
|
src: 'sendOtp',
|
|
37
|
-
onDone:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
onDone: [
|
|
38
|
+
{
|
|
39
|
+
target: 'acknowledged',
|
|
40
|
+
cond: (context, event) => event.data.status === 'success-verified',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
target: 'otp',
|
|
44
|
+
actions: 'setOtpResult',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
41
47
|
onError: {
|
|
42
48
|
target: 'idle',
|
|
43
49
|
},
|
|
@@ -16,6 +16,7 @@ export default function (request) {
|
|
|
16
16
|
email: null,
|
|
17
17
|
target: null,
|
|
18
18
|
requestId: null,
|
|
19
|
+
status: null,
|
|
19
20
|
ttl: 0,
|
|
20
21
|
},
|
|
21
22
|
states: {
|
|
@@ -115,7 +116,7 @@ export default function (request) {
|
|
|
115
116
|
},
|
|
116
117
|
},
|
|
117
118
|
verification: {
|
|
118
|
-
|
|
119
|
+
always: [{ target: '#auth_otp.verified', cond: 'isAutoVerified' }, { target: '.idle' }],
|
|
119
120
|
states: {
|
|
120
121
|
idle: {
|
|
121
122
|
on: {
|
|
@@ -174,11 +175,12 @@ export default function (request) {
|
|
|
174
175
|
}
|
|
175
176
|
}),
|
|
176
177
|
setVerificationData: assign((context, event) => {
|
|
177
|
-
const { requestId, ttl, target } = event.data
|
|
178
|
+
const { requestId, ttl, target, status } = event.data
|
|
178
179
|
return {
|
|
179
180
|
requestId,
|
|
180
181
|
ttl: ttl * 1000,
|
|
181
182
|
target,
|
|
183
|
+
status,
|
|
182
184
|
}
|
|
183
185
|
}),
|
|
184
186
|
decreaseTtl: assign((context, evnet) => {
|
|
@@ -225,6 +227,9 @@ export default function (request) {
|
|
|
225
227
|
const { error } = context
|
|
226
228
|
return error.code === 'ERR_F106'
|
|
227
229
|
},
|
|
230
|
+
isAutoVerified: (context, event) => {
|
|
231
|
+
return context.status === 'success-verified'
|
|
232
|
+
},
|
|
228
233
|
},
|
|
229
234
|
services: {
|
|
230
235
|
fetchUserInfo: async (context, event) => {
|