@jetthai/cuora 1.1.36 → 1.1.38
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/dist/bundle.mjs +36 -18
- package/package.json +1 -1
- package/src/machine/deposit/usdt.js +33 -17
- package/src/machine/withdraw_vn.js +3 -1
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.1.38](https://github.com/jetthai/cuora-module/compare/v1.1.37...v1.1.38) (2023-01-13)
|
|
6
|
+
|
|
7
|
+
### [1.1.37](https://github.com/jetthai/cuora-module/compare/v1.1.36...v1.1.37) (2023-01-13)
|
|
8
|
+
|
|
5
9
|
### [1.1.36](https://github.com/jetthai/cuora-module/compare/v1.1.35...v1.1.36) (2023-01-12)
|
|
6
10
|
|
|
7
11
|
### [1.1.35](https://github.com/jetthai/cuora-module/compare/v1.1.34...v1.1.35) (2023-01-12)
|
package/dist/bundle.mjs
CHANGED
|
@@ -15114,7 +15114,8 @@ function withdraw_vn (request) {
|
|
|
15114
15114
|
const { differAmountLimit, enableWithdraw, enableWithdrawAmount, maxWithdrawStatus, maximumWithdrawAmount, minimumWithdrawAmount } =
|
|
15115
15115
|
event.data?.withdrawRule;
|
|
15116
15116
|
|
|
15117
|
-
const
|
|
15117
|
+
const withdrawRules = event.data?.withdrawRule?.rules || [];
|
|
15118
|
+
const rules = withdrawRules.filter((rule) => rule.maxWithdrawAmount > 0);
|
|
15118
15119
|
|
|
15119
15120
|
const { balance } = context;
|
|
15120
15121
|
const lastMatchedIndex = findLastIndex_1(rules, (rule) => balance >= rule.greaterEqualThen);
|
|
@@ -15134,6 +15135,7 @@ function withdraw_vn (request) {
|
|
|
15134
15135
|
maxWithdrawAmount,
|
|
15135
15136
|
enableWithdrawAmount: +enableWithdrawAmount,
|
|
15136
15137
|
enableWithdraw,
|
|
15138
|
+
withdrawRules,
|
|
15137
15139
|
}
|
|
15138
15140
|
}),
|
|
15139
15141
|
setOtp: assign((context, event) => {
|
|
@@ -19513,10 +19515,11 @@ function usdt (request) {
|
|
|
19513
19515
|
networks: [],
|
|
19514
19516
|
selectedNetwork: null,
|
|
19515
19517
|
|
|
19518
|
+
resultMap: {},
|
|
19516
19519
|
result: {
|
|
19517
19520
|
action: '',
|
|
19518
19521
|
cdtime: null,
|
|
19519
|
-
accountNumber: '',
|
|
19522
|
+
accountNumber: '', // crypto address
|
|
19520
19523
|
currency: '',
|
|
19521
19524
|
network: '',
|
|
19522
19525
|
name: '',
|
|
@@ -19536,6 +19539,18 @@ function usdt (request) {
|
|
|
19536
19539
|
},
|
|
19537
19540
|
},
|
|
19538
19541
|
},
|
|
19542
|
+
finding: {
|
|
19543
|
+
always: [
|
|
19544
|
+
{
|
|
19545
|
+
target: 'idle',
|
|
19546
|
+
actions: 'setResultFromLocal',
|
|
19547
|
+
cond: 'isFound',
|
|
19548
|
+
},
|
|
19549
|
+
{
|
|
19550
|
+
target: 'fetching',
|
|
19551
|
+
},
|
|
19552
|
+
],
|
|
19553
|
+
},
|
|
19539
19554
|
fetching: {
|
|
19540
19555
|
invoke: {
|
|
19541
19556
|
src: 'submitDeposit',
|
|
@@ -19553,9 +19568,8 @@ function usdt (request) {
|
|
|
19553
19568
|
},
|
|
19554
19569
|
on: {
|
|
19555
19570
|
SET_NETWORK: {
|
|
19556
|
-
target: '.
|
|
19571
|
+
target: '.finding',
|
|
19557
19572
|
actions: 'setNetwork',
|
|
19558
|
-
cond: 'isDifferent',
|
|
19559
19573
|
},
|
|
19560
19574
|
},
|
|
19561
19575
|
},
|
|
@@ -19570,6 +19584,7 @@ function usdt (request) {
|
|
|
19570
19584
|
icon: value,
|
|
19571
19585
|
}
|
|
19572
19586
|
});
|
|
19587
|
+
|
|
19573
19588
|
return {
|
|
19574
19589
|
networks: defaultNetworks,
|
|
19575
19590
|
selectedNetwork: defaultNetworks[0],
|
|
@@ -19579,33 +19594,36 @@ function usdt (request) {
|
|
|
19579
19594
|
setNetwork: assign((context, event) => {
|
|
19580
19595
|
return { selectedNetwork: event.data }
|
|
19581
19596
|
}),
|
|
19597
|
+
setResultFromLocal: assign((context, event) => {
|
|
19598
|
+
const { resultMap, selectedNetwork } = context;
|
|
19599
|
+
return { result: resultMap[selectedNetwork.value] }
|
|
19600
|
+
}),
|
|
19582
19601
|
setResult: assign((context, event) => {
|
|
19583
|
-
const {
|
|
19602
|
+
const { resultMap, selectedNetwork } = context;
|
|
19603
|
+
const { action, cdtime, accountNumber, currency, network, name, qrcode } = event.data;
|
|
19604
|
+
const result = {
|
|
19584
19605
|
action,
|
|
19585
19606
|
cdtime,
|
|
19586
|
-
accountNumber,
|
|
19607
|
+
accountNumber,
|
|
19587
19608
|
currency,
|
|
19588
19609
|
network,
|
|
19589
19610
|
name,
|
|
19590
19611
|
qrcode,
|
|
19591
|
-
}
|
|
19612
|
+
};
|
|
19613
|
+
|
|
19592
19614
|
return {
|
|
19593
|
-
result
|
|
19594
|
-
|
|
19595
|
-
|
|
19596
|
-
|
|
19597
|
-
currency,
|
|
19598
|
-
network,
|
|
19599
|
-
name,
|
|
19600
|
-
qrcode,
|
|
19615
|
+
result,
|
|
19616
|
+
resultMap: {
|
|
19617
|
+
...resultMap,
|
|
19618
|
+
[selectedNetwork.value]: result,
|
|
19601
19619
|
},
|
|
19602
19620
|
}
|
|
19603
19621
|
}),
|
|
19604
19622
|
},
|
|
19605
19623
|
guards: {
|
|
19606
|
-
|
|
19607
|
-
const { selectedNetwork } = context;
|
|
19608
|
-
return selectedNetwork
|
|
19624
|
+
isFound: (context, event) => {
|
|
19625
|
+
const { resultMap, selectedNetwork } = context;
|
|
19626
|
+
return resultMap[selectedNetwork.value]
|
|
19609
19627
|
},
|
|
19610
19628
|
},
|
|
19611
19629
|
services: {
|
package/package.json
CHANGED
|
@@ -13,10 +13,11 @@ export default function (request) {
|
|
|
13
13
|
networks: [],
|
|
14
14
|
selectedNetwork: null,
|
|
15
15
|
|
|
16
|
+
resultMap: {},
|
|
16
17
|
result: {
|
|
17
18
|
action: '',
|
|
18
19
|
cdtime: null,
|
|
19
|
-
accountNumber: '',
|
|
20
|
+
accountNumber: '', // crypto address
|
|
20
21
|
currency: '',
|
|
21
22
|
network: '',
|
|
22
23
|
name: '',
|
|
@@ -36,6 +37,18 @@ export default function (request) {
|
|
|
36
37
|
},
|
|
37
38
|
},
|
|
38
39
|
},
|
|
40
|
+
finding: {
|
|
41
|
+
always: [
|
|
42
|
+
{
|
|
43
|
+
target: 'idle',
|
|
44
|
+
actions: 'setResultFromLocal',
|
|
45
|
+
cond: 'isFound',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
target: 'fetching',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
39
52
|
fetching: {
|
|
40
53
|
invoke: {
|
|
41
54
|
src: 'submitDeposit',
|
|
@@ -53,9 +66,8 @@ export default function (request) {
|
|
|
53
66
|
},
|
|
54
67
|
on: {
|
|
55
68
|
SET_NETWORK: {
|
|
56
|
-
target: '.
|
|
69
|
+
target: '.finding',
|
|
57
70
|
actions: 'setNetwork',
|
|
58
|
-
cond: 'isDifferent',
|
|
59
71
|
},
|
|
60
72
|
},
|
|
61
73
|
},
|
|
@@ -70,6 +82,7 @@ export default function (request) {
|
|
|
70
82
|
icon: value,
|
|
71
83
|
}
|
|
72
84
|
})
|
|
85
|
+
|
|
73
86
|
return {
|
|
74
87
|
networks: defaultNetworks,
|
|
75
88
|
selectedNetwork: defaultNetworks[0],
|
|
@@ -79,33 +92,36 @@ export default function (request) {
|
|
|
79
92
|
setNetwork: assign((context, event) => {
|
|
80
93
|
return { selectedNetwork: event.data }
|
|
81
94
|
}),
|
|
95
|
+
setResultFromLocal: assign((context, event) => {
|
|
96
|
+
const { resultMap, selectedNetwork } = context
|
|
97
|
+
return { result: resultMap[selectedNetwork.value] }
|
|
98
|
+
}),
|
|
82
99
|
setResult: assign((context, event) => {
|
|
83
|
-
const {
|
|
100
|
+
const { resultMap, selectedNetwork } = context
|
|
101
|
+
const { action, cdtime, accountNumber, currency, network, name, qrcode } = event.data
|
|
102
|
+
const result = {
|
|
84
103
|
action,
|
|
85
104
|
cdtime,
|
|
86
|
-
accountNumber,
|
|
105
|
+
accountNumber,
|
|
87
106
|
currency,
|
|
88
107
|
network,
|
|
89
108
|
name,
|
|
90
109
|
qrcode,
|
|
91
|
-
}
|
|
110
|
+
}
|
|
111
|
+
|
|
92
112
|
return {
|
|
93
|
-
result
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
currency,
|
|
98
|
-
network,
|
|
99
|
-
name,
|
|
100
|
-
qrcode,
|
|
113
|
+
result,
|
|
114
|
+
resultMap: {
|
|
115
|
+
...resultMap,
|
|
116
|
+
[selectedNetwork.value]: result,
|
|
101
117
|
},
|
|
102
118
|
}
|
|
103
119
|
}),
|
|
104
120
|
},
|
|
105
121
|
guards: {
|
|
106
|
-
|
|
107
|
-
const { selectedNetwork } = context
|
|
108
|
-
return selectedNetwork
|
|
122
|
+
isFound: (context, event) => {
|
|
123
|
+
const { resultMap, selectedNetwork } = context
|
|
124
|
+
return resultMap[selectedNetwork.value]
|
|
109
125
|
},
|
|
110
126
|
},
|
|
111
127
|
services: {
|
|
@@ -332,7 +332,8 @@ export default function (request) {
|
|
|
332
332
|
const { differAmountLimit, enableWithdraw, enableWithdrawAmount, maxWithdrawStatus, maximumWithdrawAmount, minimumWithdrawAmount } =
|
|
333
333
|
event.data?.withdrawRule
|
|
334
334
|
|
|
335
|
-
const
|
|
335
|
+
const withdrawRules = event.data?.withdrawRule?.rules || []
|
|
336
|
+
const rules = withdrawRules.filter((rule) => rule.maxWithdrawAmount > 0)
|
|
336
337
|
|
|
337
338
|
const { balance } = context
|
|
338
339
|
const lastMatchedIndex = findLastIndex(rules, (rule) => balance >= rule.greaterEqualThen)
|
|
@@ -352,6 +353,7 @@ export default function (request) {
|
|
|
352
353
|
maxWithdrawAmount,
|
|
353
354
|
enableWithdrawAmount: +enableWithdrawAmount,
|
|
354
355
|
enableWithdraw,
|
|
356
|
+
withdrawRules,
|
|
355
357
|
}
|
|
356
358
|
}),
|
|
357
359
|
setOtp: assign((context, event) => {
|