@jetthai/cuora 1.1.7 → 1.1.8

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.8](https://github.com/jetthai/cuora-module/compare/v1.1.7...v1.1.8) (2022-12-07)
6
+
5
7
  ### [1.1.7](https://github.com/jetthai/cuora-module/compare/v1.1.6...v1.1.7) (2022-12-06)
6
8
 
7
9
  ### [1.1.6](https://github.com/jetthai/cuora-module/compare/v1.1.5...v1.1.6) (2022-12-06)
package/dist/bundle.mjs CHANGED
@@ -16155,6 +16155,8 @@ function qrcode_v2 (request) {
16155
16155
  currentMethod: null,
16156
16156
 
16157
16157
  result: null,
16158
+
16159
+ grandTotalEnable: 1
16158
16160
  },
16159
16161
  states: {
16160
16162
  loading: {
@@ -16175,10 +16177,16 @@ function qrcode_v2 (request) {
16175
16177
  SELECT_QRCODE: {
16176
16178
  actions: 'setQrcode',
16177
16179
  },
16178
- SELECT_AMOUNT: {
16179
- target: 'debouncing',
16180
- actions: 'addAmount',
16181
- },
16180
+ SELECT_AMOUNT: [
16181
+ {
16182
+ target: 'debouncing',
16183
+ actions: 'addAmount',
16184
+ cond: (context, event) => context.grandTotalEnable === 1,
16185
+ }, {
16186
+ target: 'debouncing',
16187
+ actions: 'setAmount'
16188
+ }
16189
+ ],
16182
16190
  KEY_IN: {
16183
16191
  target: 'calculating',
16184
16192
  actions: 'setAmount',
@@ -16187,10 +16195,16 @@ function qrcode_v2 (request) {
16187
16195
  },
16188
16196
  debouncing: {
16189
16197
  on: {
16190
- SELECT_AMOUNT: {
16191
- target: 'debouncing',
16192
- actions: 'addAmount',
16193
- },
16198
+ SELECT_AMOUNT: [
16199
+ {
16200
+ target: 'debouncing',
16201
+ actions: 'addAmount',
16202
+ cond: (context, event) => context.grandTotalEnable === 1,
16203
+ }, {
16204
+ target: 'debouncing',
16205
+ actions: 'setAmount'
16206
+ }
16207
+ ],
16194
16208
  KEY_IN: {
16195
16209
  target: 'debouncing',
16196
16210
  actions: 'setAmount',
@@ -16209,10 +16223,16 @@ function qrcode_v2 (request) {
16209
16223
  calculable: {
16210
16224
  entry: 'clearCalculation',
16211
16225
  on: {
16212
- SELECT_AMOUNT: {
16213
- target: 'debouncing',
16214
- actions: 'addAmount',
16215
- },
16226
+ SELECT_AMOUNT: [
16227
+ {
16228
+ target: 'debouncing',
16229
+ actions: 'addAmount',
16230
+ cond: (context, event) => context.grandTotalEnable === 1,
16231
+ }, {
16232
+ target: 'debouncing',
16233
+ actions: 'setAmount'
16234
+ }
16235
+ ],
16216
16236
  KEY_IN: {
16217
16237
  target: 'debouncing',
16218
16238
  actions: 'setAmount',
@@ -16239,10 +16259,16 @@ function qrcode_v2 (request) {
16239
16259
  },
16240
16260
  calculated: {
16241
16261
  on: {
16242
- SELECT_AMOUNT: {
16243
- target: 'debouncing',
16244
- actions: 'addAmount',
16245
- },
16262
+ SELECT_AMOUNT: [
16263
+ {
16264
+ target: 'debouncing',
16265
+ actions: 'addAmount',
16266
+ cond: (context, event) => context.grandTotalEnable === 1,
16267
+ }, {
16268
+ target: 'debouncing',
16269
+ actions: 'setAmount'
16270
+ }
16271
+ ],
16246
16272
  KEY_IN: {
16247
16273
  target: 'debouncing',
16248
16274
  actions: 'setAmount',
@@ -16299,6 +16325,7 @@ function qrcode_v2 (request) {
16299
16325
  selectedQrcode: qrcodes[0],
16300
16326
  currentMethod: qrcodes[0].method,
16301
16327
  options: qrcodes[0].optional,
16328
+ grandTotalEnable: qrcodes[0].grandTotalEnable,
16302
16329
  }
16303
16330
  }),
16304
16331
  setQrcode: assign((context, event) => {
@@ -16306,6 +16333,7 @@ function qrcode_v2 (request) {
16306
16333
  selectedQrcode: event.data,
16307
16334
  currentMethod: event.data.method,
16308
16335
  options: event.data.optional,
16336
+ grandTotalEnable: event.data.grandTotalEnable,
16309
16337
  }
16310
16338
  }),
16311
16339
  addAmount: assign((context, event) => {
@@ -17245,6 +17273,8 @@ function crypto_button (request) {
17245
17273
 
17246
17274
  calculation: null,
17247
17275
  result: null,
17276
+
17277
+ grandTotalEnable: 1
17248
17278
  },
17249
17279
  states: {
17250
17280
  loading: {
@@ -17283,10 +17313,16 @@ function crypto_button (request) {
17283
17313
  selecting: {
17284
17314
  entry: 'reset',
17285
17315
  on: {
17286
- SELECT_AMOUNT: {
17287
- target: 'debouncing',
17288
- actions: 'addAmount'
17289
- },
17316
+ SELECT_AMOUNT: [
17317
+ {
17318
+ target: 'debouncing',
17319
+ actions: 'addAmount',
17320
+ cond: (context, event) => context.grandTotalEnable === 1,
17321
+ }, {
17322
+ target: 'debouncing',
17323
+ actions: 'setAmount'
17324
+ }
17325
+ ],
17290
17326
  KEY_IN: {
17291
17327
  target: 'debouncing',
17292
17328
  actions: 'setAmount'
@@ -17298,10 +17334,16 @@ function crypto_button (request) {
17298
17334
  },
17299
17335
  debouncing: {
17300
17336
  on: {
17301
- SELECT_AMOUNT: {
17302
- target: 'debouncing',
17303
- actions: 'addAmount',
17304
- },
17337
+ SELECT_AMOUNT: [
17338
+ {
17339
+ target: 'debouncing',
17340
+ actions: 'addAmount',
17341
+ cond: (context, event) => context.grandTotalEnable === 1,
17342
+ }, {
17343
+ target: 'debouncing',
17344
+ actions: 'setAmount'
17345
+ }
17346
+ ],
17305
17347
  KEY_IN: {
17306
17348
  target: 'debouncing',
17307
17349
  actions: 'setAmount',
@@ -17328,10 +17370,16 @@ function crypto_button (request) {
17328
17370
  },
17329
17371
  calculated: {
17330
17372
  on: {
17331
- SELECT_AMOUNT: {
17332
- target: 'debouncing',
17333
- actions: 'addAmount',
17334
- },
17373
+ SELECT_AMOUNT: [
17374
+ {
17375
+ target: 'debouncing',
17376
+ actions: 'addAmount',
17377
+ cond: (context, event) => context.grandTotalEnable === 1,
17378
+ }, {
17379
+ target: 'debouncing',
17380
+ actions: 'setAmount'
17381
+ }
17382
+ ],
17335
17383
  KEY_IN: {
17336
17384
  target: 'debouncing',
17337
17385
  actions: 'setAmount',
@@ -17394,6 +17442,7 @@ function crypto_button (request) {
17394
17442
  selectedChannel: channels[0],
17395
17443
  selectedCrypto: cryptos[0],
17396
17444
  selectedNetwork: defaultNetworks[0],
17445
+ grandTotalEnable: cryptos[0].grandTotalEnable,
17397
17446
  currentPayment,
17398
17447
  options
17399
17448
  }
@@ -17417,6 +17466,7 @@ function crypto_button (request) {
17417
17466
  selectedNetwork: networks[0],
17418
17467
  selectedAmount: null,
17419
17468
  calculation: null,
17469
+ grandTotalEnable: selectedCrypto.grandTotalEnable,
17420
17470
  options
17421
17471
  }
17422
17472
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -25,6 +25,8 @@ export default function (request) {
25
25
 
26
26
  calculation: null,
27
27
  result: null,
28
+
29
+ grandTotalEnable: 1
28
30
  },
29
31
  states: {
30
32
  loading: {
@@ -63,10 +65,16 @@ export default function (request) {
63
65
  selecting: {
64
66
  entry: 'reset',
65
67
  on: {
66
- SELECT_AMOUNT: {
67
- target: 'debouncing',
68
- actions: 'addAmount'
69
- },
68
+ SELECT_AMOUNT: [
69
+ {
70
+ target: 'debouncing',
71
+ actions: 'addAmount',
72
+ cond: (context, event) => context.grandTotalEnable === 1,
73
+ }, {
74
+ target: 'debouncing',
75
+ actions: 'setAmount'
76
+ }
77
+ ],
70
78
  KEY_IN: {
71
79
  target: 'debouncing',
72
80
  actions: 'setAmount'
@@ -78,10 +86,16 @@ export default function (request) {
78
86
  },
79
87
  debouncing: {
80
88
  on: {
81
- SELECT_AMOUNT: {
82
- target: 'debouncing',
83
- actions: 'addAmount',
84
- },
89
+ SELECT_AMOUNT: [
90
+ {
91
+ target: 'debouncing',
92
+ actions: 'addAmount',
93
+ cond: (context, event) => context.grandTotalEnable === 1,
94
+ }, {
95
+ target: 'debouncing',
96
+ actions: 'setAmount'
97
+ }
98
+ ],
85
99
  KEY_IN: {
86
100
  target: 'debouncing',
87
101
  actions: 'setAmount',
@@ -108,10 +122,16 @@ export default function (request) {
108
122
  },
109
123
  calculated: {
110
124
  on: {
111
- SELECT_AMOUNT: {
112
- target: 'debouncing',
113
- actions: 'addAmount',
114
- },
125
+ SELECT_AMOUNT: [
126
+ {
127
+ target: 'debouncing',
128
+ actions: 'addAmount',
129
+ cond: (context, event) => context.grandTotalEnable === 1,
130
+ }, {
131
+ target: 'debouncing',
132
+ actions: 'setAmount'
133
+ }
134
+ ],
115
135
  KEY_IN: {
116
136
  target: 'debouncing',
117
137
  actions: 'setAmount',
@@ -174,6 +194,7 @@ export default function (request) {
174
194
  selectedChannel: channels[0],
175
195
  selectedCrypto: cryptos[0],
176
196
  selectedNetwork: defaultNetworks[0],
197
+ grandTotalEnable: cryptos[0].grandTotalEnable,
177
198
  currentPayment,
178
199
  options
179
200
  }
@@ -197,6 +218,7 @@ export default function (request) {
197
218
  selectedNetwork: networks[0],
198
219
  selectedAmount: null,
199
220
  calculation: null,
221
+ grandTotalEnable: selectedCrypto.grandTotalEnable,
200
222
  options
201
223
  }
202
224
  }),
@@ -20,6 +20,8 @@ export default function (request) {
20
20
  currentMethod: null,
21
21
 
22
22
  result: null,
23
+
24
+ grandTotalEnable: 1
23
25
  },
24
26
  states: {
25
27
  loading: {
@@ -40,10 +42,16 @@ export default function (request) {
40
42
  SELECT_QRCODE: {
41
43
  actions: 'setQrcode',
42
44
  },
43
- SELECT_AMOUNT: {
44
- target: 'debouncing',
45
- actions: 'addAmount',
46
- },
45
+ SELECT_AMOUNT: [
46
+ {
47
+ target: 'debouncing',
48
+ actions: 'addAmount',
49
+ cond: (context, event) => context.grandTotalEnable === 1,
50
+ }, {
51
+ target: 'debouncing',
52
+ actions: 'setAmount'
53
+ }
54
+ ],
47
55
  KEY_IN: {
48
56
  target: 'calculating',
49
57
  actions: 'setAmount',
@@ -52,10 +60,16 @@ export default function (request) {
52
60
  },
53
61
  debouncing: {
54
62
  on: {
55
- SELECT_AMOUNT: {
56
- target: 'debouncing',
57
- actions: 'addAmount',
58
- },
63
+ SELECT_AMOUNT: [
64
+ {
65
+ target: 'debouncing',
66
+ actions: 'addAmount',
67
+ cond: (context, event) => context.grandTotalEnable === 1,
68
+ }, {
69
+ target: 'debouncing',
70
+ actions: 'setAmount'
71
+ }
72
+ ],
59
73
  KEY_IN: {
60
74
  target: 'debouncing',
61
75
  actions: 'setAmount',
@@ -74,10 +88,16 @@ export default function (request) {
74
88
  calculable: {
75
89
  entry: 'clearCalculation',
76
90
  on: {
77
- SELECT_AMOUNT: {
78
- target: 'debouncing',
79
- actions: 'addAmount',
80
- },
91
+ SELECT_AMOUNT: [
92
+ {
93
+ target: 'debouncing',
94
+ actions: 'addAmount',
95
+ cond: (context, event) => context.grandTotalEnable === 1,
96
+ }, {
97
+ target: 'debouncing',
98
+ actions: 'setAmount'
99
+ }
100
+ ],
81
101
  KEY_IN: {
82
102
  target: 'debouncing',
83
103
  actions: 'setAmount',
@@ -104,10 +124,16 @@ export default function (request) {
104
124
  },
105
125
  calculated: {
106
126
  on: {
107
- SELECT_AMOUNT: {
108
- target: 'debouncing',
109
- actions: 'addAmount',
110
- },
127
+ SELECT_AMOUNT: [
128
+ {
129
+ target: 'debouncing',
130
+ actions: 'addAmount',
131
+ cond: (context, event) => context.grandTotalEnable === 1,
132
+ }, {
133
+ target: 'debouncing',
134
+ actions: 'setAmount'
135
+ }
136
+ ],
111
137
  KEY_IN: {
112
138
  target: 'debouncing',
113
139
  actions: 'setAmount',
@@ -164,6 +190,7 @@ export default function (request) {
164
190
  selectedQrcode: qrcodes[0],
165
191
  currentMethod: qrcodes[0].method,
166
192
  options: qrcodes[0].optional,
193
+ grandTotalEnable: qrcodes[0].grandTotalEnable,
167
194
  }
168
195
  }),
169
196
  setQrcode: assign((context, event) => {
@@ -171,6 +198,7 @@ export default function (request) {
171
198
  selectedQrcode: event.data,
172
199
  currentMethod: event.data.method,
173
200
  options: event.data.optional,
201
+ grandTotalEnable: event.data.grandTotalEnable,
174
202
  }
175
203
  }),
176
204
  addAmount: assign((context, event) => {