@jetthai/cuora 1.1.13-3 → 1.1.13
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 +0 -6
- package/dist/bundle.mjs +34 -560
- package/package.json +1 -1
- package/src/api/payment.js +0 -2
- package/src/machine/deposit/crypto_button.js +9 -137
- package/src/machine/deposit/loadcard_vn.js +13 -142
- package/src/machine/deposit/qrcode_v2.js +12 -168
- package/src/machine/index.js +0 -2
- package/src/machine/promotions.js +0 -115
package/dist/bundle.mjs
CHANGED
|
@@ -3845,8 +3845,6 @@ var payment = {
|
|
|
3845
3845
|
method: 'post',
|
|
3846
3846
|
params: { transferType: 'WITHDRAW', amount },
|
|
3847
3847
|
}),
|
|
3848
|
-
getPromotionsList: () => ({ url: `bankWallet/promotions`, method: 'get' }),
|
|
3849
|
-
getJoinedPromotion: () => ({ url: `bankWallet/promotions`, method: 'get' }),
|
|
3850
3848
|
};
|
|
3851
3849
|
|
|
3852
3850
|
var user = {
|
|
@@ -16271,13 +16269,11 @@ function manual_vn (request) {
|
|
|
16271
16269
|
}
|
|
16272
16270
|
|
|
16273
16271
|
function loadcard_vn (request) {
|
|
16274
|
-
const { appSecret } = request.config;
|
|
16275
16272
|
return createMachine(
|
|
16276
16273
|
{
|
|
16277
16274
|
id: 'loadcard',
|
|
16278
16275
|
initial: 'loading',
|
|
16279
16276
|
context: {
|
|
16280
|
-
siteConfig: null,
|
|
16281
16277
|
cards: [],
|
|
16282
16278
|
options: [],
|
|
16283
16279
|
|
|
@@ -16288,7 +16284,7 @@ function loadcard_vn (request) {
|
|
|
16288
16284
|
|
|
16289
16285
|
calculation: null,
|
|
16290
16286
|
|
|
16291
|
-
|
|
16287
|
+
paymentDetails: [],
|
|
16292
16288
|
currentCategory: 'loadcard',
|
|
16293
16289
|
currentMethod: null,
|
|
16294
16290
|
currentPayment: null,
|
|
@@ -16298,127 +16294,15 @@ function loadcard_vn (request) {
|
|
|
16298
16294
|
invoke: {
|
|
16299
16295
|
src: 'fetchInitData',
|
|
16300
16296
|
onDone: {
|
|
16301
|
-
target: '
|
|
16302
|
-
actions:
|
|
16297
|
+
target: 'loaded',
|
|
16298
|
+
actions: 'setInitData',
|
|
16303
16299
|
},
|
|
16304
16300
|
onError: {
|
|
16305
16301
|
target: 'fail',
|
|
16306
16302
|
},
|
|
16307
16303
|
},
|
|
16308
16304
|
},
|
|
16309
|
-
|
|
16310
|
-
always: [{ target: 'promotionApplyMode', cond: 'isPromotionApplyMode' }, { target: 'defaultMode' }],
|
|
16311
|
-
},
|
|
16312
|
-
promotionApplyMode: {
|
|
16313
|
-
initial: 'loaded',
|
|
16314
|
-
states: {
|
|
16315
|
-
loaded: {
|
|
16316
|
-
entry: 'reset',
|
|
16317
|
-
on: {
|
|
16318
|
-
SELECT_CARD: {
|
|
16319
|
-
actions: 'setCard',
|
|
16320
|
-
},
|
|
16321
|
-
SELECT_AMOUNT: {
|
|
16322
|
-
target: 'submittable',
|
|
16323
|
-
actions: 'setAmount',
|
|
16324
|
-
},
|
|
16325
|
-
},
|
|
16326
|
-
},
|
|
16327
|
-
submittable: {
|
|
16328
|
-
on: {
|
|
16329
|
-
SELECT_AMOUNT: {
|
|
16330
|
-
actions: 'setAmount',
|
|
16331
|
-
},
|
|
16332
|
-
CONFIRM: {
|
|
16333
|
-
target: 'debouncing',
|
|
16334
|
-
},
|
|
16335
|
-
BACK: {
|
|
16336
|
-
target: 'loaded',
|
|
16337
|
-
},
|
|
16338
|
-
},
|
|
16339
|
-
},
|
|
16340
|
-
debouncing: {
|
|
16341
|
-
on: {
|
|
16342
|
-
SELECT_AMOUNT: {
|
|
16343
|
-
target: 'debouncing',
|
|
16344
|
-
actions: 'setAmount',
|
|
16345
|
-
},
|
|
16346
|
-
BACK: {
|
|
16347
|
-
target: 'loaded',
|
|
16348
|
-
},
|
|
16349
|
-
},
|
|
16350
|
-
after: {
|
|
16351
|
-
1000: {
|
|
16352
|
-
target: 'calculating',
|
|
16353
|
-
},
|
|
16354
|
-
},
|
|
16355
|
-
},
|
|
16356
|
-
calculable: {
|
|
16357
|
-
entry: 'clearCalculation',
|
|
16358
|
-
on: {
|
|
16359
|
-
SELECT_AMOUNT: {
|
|
16360
|
-
target: 'debouncing',
|
|
16361
|
-
actions: 'setAmount',
|
|
16362
|
-
},
|
|
16363
|
-
CALCULATE: {
|
|
16364
|
-
target: 'debouncing',
|
|
16365
|
-
},
|
|
16366
|
-
BACK: {
|
|
16367
|
-
target: 'loaded',
|
|
16368
|
-
},
|
|
16369
|
-
},
|
|
16370
|
-
},
|
|
16371
|
-
calculating: {
|
|
16372
|
-
invoke: {
|
|
16373
|
-
src: 'fetchCalculation',
|
|
16374
|
-
onDone: {
|
|
16375
|
-
target: 'cardInfo',
|
|
16376
|
-
actions: 'setCalculation',
|
|
16377
|
-
},
|
|
16378
|
-
onError: {
|
|
16379
|
-
target: 'calculable',
|
|
16380
|
-
},
|
|
16381
|
-
},
|
|
16382
|
-
},
|
|
16383
|
-
cardInfo: {
|
|
16384
|
-
on: {
|
|
16385
|
-
INPUT_CARD_NUMBER: {
|
|
16386
|
-
actions: 'setCardNumber',
|
|
16387
|
-
},
|
|
16388
|
-
INPUT_SERIAL_NUMBER: {
|
|
16389
|
-
actions: 'setSerialNumber',
|
|
16390
|
-
},
|
|
16391
|
-
SUBMIT: {
|
|
16392
|
-
target: 'submitting',
|
|
16393
|
-
cond: 'isSubmittable',
|
|
16394
|
-
},
|
|
16395
|
-
SELECT_CARD: {
|
|
16396
|
-
target: 'loaded',
|
|
16397
|
-
actions: 'setCard',
|
|
16398
|
-
},
|
|
16399
|
-
},
|
|
16400
|
-
},
|
|
16401
|
-
submitting: {
|
|
16402
|
-
invoke: {
|
|
16403
|
-
src: 'submitDeposit',
|
|
16404
|
-
onDone: {
|
|
16405
|
-
target: 'submitted',
|
|
16406
|
-
},
|
|
16407
|
-
onError: {
|
|
16408
|
-
target: 'cardInfo',
|
|
16409
|
-
},
|
|
16410
|
-
},
|
|
16411
|
-
},
|
|
16412
|
-
submitted: {
|
|
16413
|
-
on: {
|
|
16414
|
-
BACK: {
|
|
16415
|
-
target: 'loaded',
|
|
16416
|
-
},
|
|
16417
|
-
},
|
|
16418
|
-
},
|
|
16419
|
-
},
|
|
16420
|
-
},
|
|
16421
|
-
defaultMode: {
|
|
16305
|
+
loaded: {
|
|
16422
16306
|
entry: 'reset',
|
|
16423
16307
|
on: {
|
|
16424
16308
|
SELECT_CARD: {
|
|
@@ -16437,7 +16321,7 @@ function loadcard_vn (request) {
|
|
|
16437
16321
|
actions: 'setAmount',
|
|
16438
16322
|
},
|
|
16439
16323
|
BACK: {
|
|
16440
|
-
target: '
|
|
16324
|
+
target: 'loaded',
|
|
16441
16325
|
},
|
|
16442
16326
|
},
|
|
16443
16327
|
after: {
|
|
@@ -16458,7 +16342,7 @@ function loadcard_vn (request) {
|
|
|
16458
16342
|
target: 'debouncing',
|
|
16459
16343
|
},
|
|
16460
16344
|
BACK: {
|
|
16461
|
-
target: '
|
|
16345
|
+
target: 'loaded',
|
|
16462
16346
|
},
|
|
16463
16347
|
},
|
|
16464
16348
|
},
|
|
@@ -16484,7 +16368,7 @@ function loadcard_vn (request) {
|
|
|
16484
16368
|
target: 'cardInfo',
|
|
16485
16369
|
},
|
|
16486
16370
|
BACK: {
|
|
16487
|
-
target: '
|
|
16371
|
+
target: 'loaded',
|
|
16488
16372
|
},
|
|
16489
16373
|
CLEAR_CALCULATION: {
|
|
16490
16374
|
target: 'debouncing',
|
|
@@ -16505,7 +16389,7 @@ function loadcard_vn (request) {
|
|
|
16505
16389
|
cond: 'isSubmittable',
|
|
16506
16390
|
},
|
|
16507
16391
|
SELECT_CARD: {
|
|
16508
|
-
target: '
|
|
16392
|
+
target: 'loaded',
|
|
16509
16393
|
actions: 'setCard',
|
|
16510
16394
|
},
|
|
16511
16395
|
},
|
|
@@ -16524,7 +16408,7 @@ function loadcard_vn (request) {
|
|
|
16524
16408
|
submitted: {
|
|
16525
16409
|
on: {
|
|
16526
16410
|
BACK: {
|
|
16527
|
-
target: '
|
|
16411
|
+
target: 'loaded',
|
|
16528
16412
|
},
|
|
16529
16413
|
},
|
|
16530
16414
|
},
|
|
@@ -16541,22 +16425,16 @@ function loadcard_vn (request) {
|
|
|
16541
16425
|
}
|
|
16542
16426
|
}),
|
|
16543
16427
|
setInitData: assign((context, event) => {
|
|
16544
|
-
const
|
|
16545
|
-
const cards =
|
|
16428
|
+
const paymentDetails = event.data;
|
|
16429
|
+
const cards = paymentDetails.filter((element) => element.category === context.currentCategory);
|
|
16546
16430
|
return {
|
|
16547
|
-
|
|
16431
|
+
paymentDetails,
|
|
16548
16432
|
cards,
|
|
16549
16433
|
selectedCard: cards[0],
|
|
16550
16434
|
currentMethod: cards[0].method,
|
|
16551
16435
|
options: cards[0].optional,
|
|
16552
16436
|
}
|
|
16553
16437
|
}),
|
|
16554
|
-
preset: assign((context, event) => {
|
|
16555
|
-
const { siteConfig } = event.data;
|
|
16556
|
-
return {
|
|
16557
|
-
siteConfig,
|
|
16558
|
-
}
|
|
16559
|
-
}),
|
|
16560
16438
|
setCard: assign((context, event) => {
|
|
16561
16439
|
return {
|
|
16562
16440
|
selectedCard: event.data,
|
|
@@ -16589,9 +16467,6 @@ function loadcard_vn (request) {
|
|
|
16589
16467
|
}),
|
|
16590
16468
|
},
|
|
16591
16469
|
guards: {
|
|
16592
|
-
isPromotionApplyMode: (context, event) => {
|
|
16593
|
-
return context.siteConfig?.promotionApplyMode === '1'
|
|
16594
|
-
},
|
|
16595
16470
|
isSubmittable: (context, event) => {
|
|
16596
16471
|
const { cardNumber, serialNumber } = context;
|
|
16597
16472
|
return cardNumber && serialNumber
|
|
@@ -16599,12 +16474,7 @@ function loadcard_vn (request) {
|
|
|
16599
16474
|
},
|
|
16600
16475
|
services: {
|
|
16601
16476
|
fetchInitData: async (context, event) => {
|
|
16602
|
-
|
|
16603
|
-
request.send(common$1.getConfig({ appSecret })),
|
|
16604
|
-
request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
|
|
16605
|
-
]);
|
|
16606
|
-
const siteConfig = JSON.parse(window.atob(config));
|
|
16607
|
-
return { siteConfig, paymentDetail }
|
|
16477
|
+
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
16608
16478
|
},
|
|
16609
16479
|
fetchCalculation: async (context, event) => {
|
|
16610
16480
|
const { currentMethod, selectedAmount } = context;
|
|
@@ -16837,13 +16707,11 @@ function qrcode_vn (request) {
|
|
|
16837
16707
|
}
|
|
16838
16708
|
|
|
16839
16709
|
function qrcode_v2 (request) {
|
|
16840
|
-
const { appSecret } = request.config;
|
|
16841
16710
|
return createMachine(
|
|
16842
16711
|
{
|
|
16843
16712
|
id: 'qrcode',
|
|
16844
16713
|
initial: 'loading',
|
|
16845
16714
|
context: {
|
|
16846
|
-
siteConfig: null,
|
|
16847
16715
|
qrcodes: null,
|
|
16848
16716
|
options: null,
|
|
16849
16717
|
|
|
@@ -16852,7 +16720,7 @@ function qrcode_v2 (request) {
|
|
|
16852
16720
|
|
|
16853
16721
|
calculation: null,
|
|
16854
16722
|
|
|
16855
|
-
|
|
16723
|
+
paymentDetails: [],
|
|
16856
16724
|
currentCategory: 'qrcode',
|
|
16857
16725
|
currentMethod: null,
|
|
16858
16726
|
|
|
@@ -16865,152 +16733,15 @@ function qrcode_v2 (request) {
|
|
|
16865
16733
|
invoke: {
|
|
16866
16734
|
src: 'fetchInitData',
|
|
16867
16735
|
onDone: {
|
|
16868
|
-
target: '
|
|
16869
|
-
actions:
|
|
16736
|
+
target: 'loaded',
|
|
16737
|
+
actions: 'setInitData',
|
|
16870
16738
|
},
|
|
16871
16739
|
onError: {
|
|
16872
16740
|
target: 'fail',
|
|
16873
16741
|
},
|
|
16874
16742
|
},
|
|
16875
16743
|
},
|
|
16876
|
-
|
|
16877
|
-
always: [{ target: 'promotionApplyMode', cond: 'isPromotionApplyMode' }, { target: 'defaultMode' }],
|
|
16878
|
-
},
|
|
16879
|
-
promotionApplyMode: {
|
|
16880
|
-
initial: 'loaded',
|
|
16881
|
-
states: {
|
|
16882
|
-
loaded: {
|
|
16883
|
-
entry: 'reset',
|
|
16884
|
-
on: {
|
|
16885
|
-
SELECT_QRCODE: {
|
|
16886
|
-
actions: 'setQrcode',
|
|
16887
|
-
},
|
|
16888
|
-
SELECT_AMOUNT: [
|
|
16889
|
-
{
|
|
16890
|
-
target: 'submittable',
|
|
16891
|
-
actions: 'addAmount',
|
|
16892
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16893
|
-
},
|
|
16894
|
-
{
|
|
16895
|
-
target: 'submittable',
|
|
16896
|
-
actions: 'setAmount',
|
|
16897
|
-
},
|
|
16898
|
-
],
|
|
16899
|
-
KEY_IN: {
|
|
16900
|
-
actions: 'setAmount',
|
|
16901
|
-
},
|
|
16902
|
-
},
|
|
16903
|
-
},
|
|
16904
|
-
submittable: {
|
|
16905
|
-
on: {
|
|
16906
|
-
SELECT_AMOUNT: [
|
|
16907
|
-
{
|
|
16908
|
-
actions: 'addAmount',
|
|
16909
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16910
|
-
},
|
|
16911
|
-
{
|
|
16912
|
-
actions: 'setAmount',
|
|
16913
|
-
},
|
|
16914
|
-
],
|
|
16915
|
-
KEY_IN: {
|
|
16916
|
-
actions: 'setAmount',
|
|
16917
|
-
},
|
|
16918
|
-
CONFIRM: {
|
|
16919
|
-
target: 'debouncing',
|
|
16920
|
-
},
|
|
16921
|
-
BACK: {
|
|
16922
|
-
target: 'loaded',
|
|
16923
|
-
},
|
|
16924
|
-
},
|
|
16925
|
-
},
|
|
16926
|
-
debouncing: {
|
|
16927
|
-
on: {
|
|
16928
|
-
SELECT_AMOUNT: [
|
|
16929
|
-
{
|
|
16930
|
-
target: 'debouncing',
|
|
16931
|
-
actions: 'addAmount',
|
|
16932
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16933
|
-
},
|
|
16934
|
-
{
|
|
16935
|
-
target: 'debouncing',
|
|
16936
|
-
actions: 'setAmount',
|
|
16937
|
-
},
|
|
16938
|
-
],
|
|
16939
|
-
KEY_IN: {
|
|
16940
|
-
target: 'debouncing',
|
|
16941
|
-
actions: 'setAmount',
|
|
16942
|
-
},
|
|
16943
|
-
BACK: {
|
|
16944
|
-
target: 'loaded',
|
|
16945
|
-
},
|
|
16946
|
-
},
|
|
16947
|
-
after: {
|
|
16948
|
-
1000: {
|
|
16949
|
-
target: 'calculating',
|
|
16950
|
-
},
|
|
16951
|
-
},
|
|
16952
|
-
},
|
|
16953
|
-
calculable: {
|
|
16954
|
-
entry: 'clearCalculation',
|
|
16955
|
-
on: {
|
|
16956
|
-
SELECT_AMOUNT: [
|
|
16957
|
-
{
|
|
16958
|
-
target: 'debouncing',
|
|
16959
|
-
actions: 'addAmount',
|
|
16960
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16961
|
-
},
|
|
16962
|
-
{
|
|
16963
|
-
target: 'debouncing',
|
|
16964
|
-
actions: 'setAmount',
|
|
16965
|
-
},
|
|
16966
|
-
],
|
|
16967
|
-
KEY_IN: {
|
|
16968
|
-
target: 'debouncing',
|
|
16969
|
-
actions: 'setAmount',
|
|
16970
|
-
},
|
|
16971
|
-
CALCULATE: {
|
|
16972
|
-
target: 'debouncing',
|
|
16973
|
-
},
|
|
16974
|
-
BACK: {
|
|
16975
|
-
target: 'loaded',
|
|
16976
|
-
},
|
|
16977
|
-
},
|
|
16978
|
-
},
|
|
16979
|
-
calculating: {
|
|
16980
|
-
invoke: {
|
|
16981
|
-
src: 'fetchCalculation',
|
|
16982
|
-
onDone: {
|
|
16983
|
-
target: 'submitting',
|
|
16984
|
-
actions: 'setCalculation',
|
|
16985
|
-
},
|
|
16986
|
-
onError: {
|
|
16987
|
-
target: 'calculable',
|
|
16988
|
-
},
|
|
16989
|
-
},
|
|
16990
|
-
},
|
|
16991
|
-
submitting: {
|
|
16992
|
-
invoke: {
|
|
16993
|
-
src: 'submitDeposit',
|
|
16994
|
-
onDone: {
|
|
16995
|
-
target: 'submitted',
|
|
16996
|
-
actions: 'setResult',
|
|
16997
|
-
},
|
|
16998
|
-
onError: {
|
|
16999
|
-
target: 'submittable',
|
|
17000
|
-
},
|
|
17001
|
-
},
|
|
17002
|
-
},
|
|
17003
|
-
submitted: {
|
|
17004
|
-
on: {
|
|
17005
|
-
SELECT_QRCODE: {
|
|
17006
|
-
target: 'loaded',
|
|
17007
|
-
actions: 'setQrcode',
|
|
17008
|
-
},
|
|
17009
|
-
},
|
|
17010
|
-
},
|
|
17011
|
-
},
|
|
17012
|
-
},
|
|
17013
|
-
defaultMode: {
|
|
16744
|
+
loaded: {
|
|
17014
16745
|
entry: 'reset',
|
|
17015
16746
|
on: {
|
|
17016
16747
|
SELECT_QRCODE: {
|
|
@@ -17051,7 +16782,7 @@ function qrcode_v2 (request) {
|
|
|
17051
16782
|
actions: 'setAmount',
|
|
17052
16783
|
},
|
|
17053
16784
|
BACK: {
|
|
17054
|
-
target: '
|
|
16785
|
+
target: 'loaded',
|
|
17055
16786
|
},
|
|
17056
16787
|
},
|
|
17057
16788
|
after: {
|
|
@@ -17083,7 +16814,7 @@ function qrcode_v2 (request) {
|
|
|
17083
16814
|
target: 'debouncing',
|
|
17084
16815
|
},
|
|
17085
16816
|
BACK: {
|
|
17086
|
-
target: '
|
|
16817
|
+
target: 'loaded',
|
|
17087
16818
|
},
|
|
17088
16819
|
},
|
|
17089
16820
|
},
|
|
@@ -17120,7 +16851,7 @@ function qrcode_v2 (request) {
|
|
|
17120
16851
|
target: 'submitting',
|
|
17121
16852
|
},
|
|
17122
16853
|
BACK: {
|
|
17123
|
-
target: '
|
|
16854
|
+
target: 'loaded',
|
|
17124
16855
|
},
|
|
17125
16856
|
CLEAR_CALCULATION: {
|
|
17126
16857
|
target: 'debouncing',
|
|
@@ -17143,7 +16874,7 @@ function qrcode_v2 (request) {
|
|
|
17143
16874
|
submitted: {
|
|
17144
16875
|
on: {
|
|
17145
16876
|
SELECT_QRCODE: {
|
|
17146
|
-
target: '
|
|
16877
|
+
target: 'loaded',
|
|
17147
16878
|
actions: 'setQrcode',
|
|
17148
16879
|
},
|
|
17149
16880
|
},
|
|
@@ -17159,11 +16890,11 @@ function qrcode_v2 (request) {
|
|
|
17159
16890
|
}
|
|
17160
16891
|
}),
|
|
17161
16892
|
setInitData: assign((context, event) => {
|
|
17162
|
-
const
|
|
17163
|
-
const qrcodes =
|
|
16893
|
+
const paymentDetails = event.data;
|
|
16894
|
+
const qrcodes = paymentDetails.filter((element) => element.category === context.currentCategory);
|
|
17164
16895
|
|
|
17165
16896
|
return {
|
|
17166
|
-
|
|
16897
|
+
paymentDetails,
|
|
17167
16898
|
qrcodes,
|
|
17168
16899
|
selectedQrcode: qrcodes[0],
|
|
17169
16900
|
currentMethod: qrcodes[0].method,
|
|
@@ -17171,12 +16902,6 @@ function qrcode_v2 (request) {
|
|
|
17171
16902
|
grandTotalEnable: qrcodes[0].grandTotalEnable,
|
|
17172
16903
|
}
|
|
17173
16904
|
}),
|
|
17174
|
-
preset: assign((context, event) => {
|
|
17175
|
-
const { siteConfig } = event.data;
|
|
17176
|
-
return {
|
|
17177
|
-
siteConfig,
|
|
17178
|
-
}
|
|
17179
|
-
}),
|
|
17180
16905
|
setQrcode: assign((context, event) => {
|
|
17181
16906
|
return {
|
|
17182
16907
|
selectedQrcode: event.data,
|
|
@@ -17207,19 +16932,9 @@ function qrcode_v2 (request) {
|
|
|
17207
16932
|
}
|
|
17208
16933
|
}),
|
|
17209
16934
|
},
|
|
17210
|
-
guards: {
|
|
17211
|
-
isPromotionApplyMode: (context, event) => {
|
|
17212
|
-
return context.siteConfig?.promotionApplyMode === '1'
|
|
17213
|
-
},
|
|
17214
|
-
},
|
|
17215
16935
|
services: {
|
|
17216
16936
|
fetchInitData: async (context, event) => {
|
|
17217
|
-
|
|
17218
|
-
request.send(common$1.getConfig({ appSecret })),
|
|
17219
|
-
request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
|
|
17220
|
-
]);
|
|
17221
|
-
const siteConfig = JSON.parse(window.atob(config));
|
|
17222
|
-
return { siteConfig, paymentDetail }
|
|
16937
|
+
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
17223
16938
|
},
|
|
17224
16939
|
fetchCalculation: async (context, event) => {
|
|
17225
16940
|
const { currentMethod, selectedAmount } = context;
|
|
@@ -18113,13 +17828,11 @@ function crypto (request) {
|
|
|
18113
17828
|
}
|
|
18114
17829
|
|
|
18115
17830
|
function crypto_button (request) {
|
|
18116
|
-
const { appSecret } = request.config;
|
|
18117
17831
|
return createMachine(
|
|
18118
17832
|
{
|
|
18119
17833
|
id: 'crypro_button',
|
|
18120
17834
|
initial: 'loading',
|
|
18121
17835
|
context: {
|
|
18122
|
-
siteConfig: null,
|
|
18123
17836
|
paymentDetails: [],
|
|
18124
17837
|
|
|
18125
17838
|
channels: [],
|
|
@@ -18143,127 +17856,17 @@ function crypto_button (request) {
|
|
|
18143
17856
|
states: {
|
|
18144
17857
|
loading: {
|
|
18145
17858
|
invoke: {
|
|
18146
|
-
src: '
|
|
17859
|
+
src: 'fetchPayments',
|
|
18147
17860
|
onDone: {
|
|
18148
|
-
target: '
|
|
18149
|
-
actions:
|
|
17861
|
+
target: 'loaded',
|
|
17862
|
+
actions: 'setCryptos',
|
|
18150
17863
|
},
|
|
18151
17864
|
onError: {
|
|
18152
17865
|
target: 'fail',
|
|
18153
17866
|
},
|
|
18154
17867
|
},
|
|
18155
17868
|
},
|
|
18156
|
-
|
|
18157
|
-
always: [{ target: 'promotionApplyMode', cond: 'isPromotionApplyMode' }, { target: 'defaultMode' }],
|
|
18158
|
-
},
|
|
18159
|
-
promotionApplyMode: {
|
|
18160
|
-
initial: 'loaded',
|
|
18161
|
-
states: {
|
|
18162
|
-
loaded: {
|
|
18163
|
-
entry: 'reset',
|
|
18164
|
-
on: {
|
|
18165
|
-
SET_CHANNEL: {
|
|
18166
|
-
actions: 'setChannel',
|
|
18167
|
-
},
|
|
18168
|
-
SET_CRYPTO: {
|
|
18169
|
-
actions: 'setCrypto',
|
|
18170
|
-
},
|
|
18171
|
-
SET_NETWORK: {
|
|
18172
|
-
actions: 'setNetwork',
|
|
18173
|
-
},
|
|
18174
|
-
SET_ADDRESS: {
|
|
18175
|
-
actions: 'setAddress',
|
|
18176
|
-
},
|
|
18177
|
-
CONFIRM: {
|
|
18178
|
-
target: 'selecting',
|
|
18179
|
-
cond: 'isConfirmable',
|
|
18180
|
-
},
|
|
18181
|
-
},
|
|
18182
|
-
},
|
|
18183
|
-
selecting: {
|
|
18184
|
-
entry: 'reset',
|
|
18185
|
-
on: {
|
|
18186
|
-
SELECT_AMOUNT: [
|
|
18187
|
-
{
|
|
18188
|
-
actions: 'addAmount',
|
|
18189
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
18190
|
-
},
|
|
18191
|
-
{
|
|
18192
|
-
actions: 'setAmount',
|
|
18193
|
-
},
|
|
18194
|
-
],
|
|
18195
|
-
KEY_IN: {
|
|
18196
|
-
actions: 'setAmount',
|
|
18197
|
-
},
|
|
18198
|
-
SUBMIT: {
|
|
18199
|
-
target: 'debouncing',
|
|
18200
|
-
},
|
|
18201
|
-
BACK: {
|
|
18202
|
-
target: 'loaded',
|
|
18203
|
-
},
|
|
18204
|
-
CLEAR_ALL: {
|
|
18205
|
-
actions: 'reset',
|
|
18206
|
-
},
|
|
18207
|
-
},
|
|
18208
|
-
},
|
|
18209
|
-
debouncing: {
|
|
18210
|
-
on: {
|
|
18211
|
-
SELECT_AMOUNT: [
|
|
18212
|
-
{
|
|
18213
|
-
target: 'debouncing',
|
|
18214
|
-
actions: 'addAmount',
|
|
18215
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
18216
|
-
},
|
|
18217
|
-
{
|
|
18218
|
-
target: 'debouncing',
|
|
18219
|
-
actions: 'setAmount',
|
|
18220
|
-
},
|
|
18221
|
-
],
|
|
18222
|
-
KEY_IN: {
|
|
18223
|
-
target: 'debouncing',
|
|
18224
|
-
actions: 'setAmount',
|
|
18225
|
-
},
|
|
18226
|
-
BACK: {
|
|
18227
|
-
target: 'loaded',
|
|
18228
|
-
},
|
|
18229
|
-
CLEAR_ALL: {
|
|
18230
|
-
actions: 'reset',
|
|
18231
|
-
},
|
|
18232
|
-
},
|
|
18233
|
-
after: {
|
|
18234
|
-
1000: {
|
|
18235
|
-
target: 'calculating',
|
|
18236
|
-
},
|
|
18237
|
-
},
|
|
18238
|
-
},
|
|
18239
|
-
calculating: {
|
|
18240
|
-
invoke: {
|
|
18241
|
-
src: 'fetchCalculation',
|
|
18242
|
-
onDone: {
|
|
18243
|
-
target: 'submitting',
|
|
18244
|
-
actions: 'setCalculation',
|
|
18245
|
-
},
|
|
18246
|
-
onError: {
|
|
18247
|
-
target: 'selecting',
|
|
18248
|
-
actions: 'reset',
|
|
18249
|
-
},
|
|
18250
|
-
},
|
|
18251
|
-
},
|
|
18252
|
-
submitting: {
|
|
18253
|
-
invoke: {
|
|
18254
|
-
src: 'submitDeposit',
|
|
18255
|
-
onDone: {
|
|
18256
|
-
target: '#crypro_button.submitted',
|
|
18257
|
-
actions: 'setResult',
|
|
18258
|
-
},
|
|
18259
|
-
onError: {
|
|
18260
|
-
target: 'selecting',
|
|
18261
|
-
},
|
|
18262
|
-
},
|
|
18263
|
-
},
|
|
18264
|
-
},
|
|
18265
|
-
},
|
|
18266
|
-
defaultMode: {
|
|
17869
|
+
loaded: {
|
|
18267
17870
|
on: {
|
|
18268
17871
|
SET_CHANNEL: {
|
|
18269
17872
|
actions: 'setChannel',
|
|
@@ -18303,7 +17906,7 @@ function crypto_button (request) {
|
|
|
18303
17906
|
actions: 'setAmount',
|
|
18304
17907
|
},
|
|
18305
17908
|
BACK: {
|
|
18306
|
-
target: '
|
|
17909
|
+
target: 'loaded',
|
|
18307
17910
|
},
|
|
18308
17911
|
},
|
|
18309
17912
|
},
|
|
@@ -18398,9 +18001,8 @@ function crypto_button (request) {
|
|
|
18398
18001
|
calculation: null,
|
|
18399
18002
|
}
|
|
18400
18003
|
}),
|
|
18401
|
-
|
|
18402
|
-
const {
|
|
18403
|
-
const cryptos = paymentDetail?.map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || [];
|
|
18004
|
+
setCryptos: assign((context, event) => {
|
|
18005
|
+
const cryptos = event.data?.map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || [];
|
|
18404
18006
|
const currentPayment = cryptos.find((element) => element.category === context.currentCategory);
|
|
18405
18007
|
const channels = cryptos.map((item, i) => ({ ...item, label: `Channel ${padStart_1(String(i + 1), 2, '0')}`, icon: 'channel' }));
|
|
18406
18008
|
const defaultNetworks =
|
|
@@ -18424,12 +18026,6 @@ function crypto_button (request) {
|
|
|
18424
18026
|
options,
|
|
18425
18027
|
}
|
|
18426
18028
|
}),
|
|
18427
|
-
preset: assign((context, event) => {
|
|
18428
|
-
const { siteConfig } = event.data;
|
|
18429
|
-
return {
|
|
18430
|
-
siteConfig,
|
|
18431
|
-
}
|
|
18432
|
-
}),
|
|
18433
18029
|
setChannel: assign((context, event) => {
|
|
18434
18030
|
const { cryptos } = context;
|
|
18435
18031
|
const selectedCrypto = cryptos.find((crypto) => crypto.method === event.data.value);
|
|
@@ -18509,9 +18105,6 @@ function crypto_button (request) {
|
|
|
18509
18105
|
}),
|
|
18510
18106
|
},
|
|
18511
18107
|
guards: {
|
|
18512
|
-
isPromotionApplyMode: (context, event) => {
|
|
18513
|
-
return context.siteConfig?.promotionApplyMode === '1'
|
|
18514
|
-
},
|
|
18515
18108
|
isConfirmable: (context, event) => {
|
|
18516
18109
|
const { selectedCrypto, selectedNetwork } = context;
|
|
18517
18110
|
return selectedCrypto && selectedNetwork
|
|
@@ -18522,13 +18115,8 @@ function crypto_button (request) {
|
|
|
18522
18115
|
},
|
|
18523
18116
|
},
|
|
18524
18117
|
services: {
|
|
18525
|
-
|
|
18526
|
-
|
|
18527
|
-
request.send(common$1.getConfig({ appSecret })),
|
|
18528
|
-
request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
|
|
18529
|
-
]);
|
|
18530
|
-
const siteConfig = JSON.parse(window.atob(config));
|
|
18531
|
-
return { siteConfig, paymentDetail }
|
|
18118
|
+
fetchPayments: async (context, event) => {
|
|
18119
|
+
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
18532
18120
|
},
|
|
18533
18121
|
fetchCalculation: async (context, event) => {
|
|
18534
18122
|
const { selectedCrypto, selectedAmount } = context;
|
|
@@ -20100,119 +19688,6 @@ function vip_table (request) {
|
|
|
20100
19688
|
)
|
|
20101
19689
|
}
|
|
20102
19690
|
|
|
20103
|
-
function promotions (request) {
|
|
20104
|
-
return createMachine(
|
|
20105
|
-
{
|
|
20106
|
-
id: 'promotions',
|
|
20107
|
-
initial: 'loading',
|
|
20108
|
-
context: {
|
|
20109
|
-
noBonus: {
|
|
20110
|
-
promotionsNo: 'No Bonus',
|
|
20111
|
-
title: 'No Bonus',
|
|
20112
|
-
adSmallUrl: [
|
|
20113
|
-
{
|
|
20114
|
-
url: '~/assets/images/deposit/deposit_img_nobonus_normal.png',
|
|
20115
|
-
name: 'No Bonus',
|
|
20116
|
-
},
|
|
20117
|
-
],
|
|
20118
|
-
descrip: 'no_bonus',
|
|
20119
|
-
minimumAmount: 0,
|
|
20120
|
-
turnoverLimitMultiple: 1,
|
|
20121
|
-
promotionDetail: [],
|
|
20122
|
-
withdrawLimitDetail: [],
|
|
20123
|
-
limitGameDetail: [],
|
|
20124
|
-
},
|
|
20125
|
-
promotionsList: [],
|
|
20126
|
-
selectedPromo: {},
|
|
20127
|
-
joinedPromotion: null,
|
|
20128
|
-
},
|
|
20129
|
-
states: {
|
|
20130
|
-
loading: {
|
|
20131
|
-
invoke: {
|
|
20132
|
-
src: 'fetchPromotionsList',
|
|
20133
|
-
onDone: {
|
|
20134
|
-
target: 'loaded',
|
|
20135
|
-
actions: 'setInit',
|
|
20136
|
-
},
|
|
20137
|
-
onError: {
|
|
20138
|
-
target: 'fail',
|
|
20139
|
-
},
|
|
20140
|
-
},
|
|
20141
|
-
},
|
|
20142
|
-
fetching: {
|
|
20143
|
-
invoke: {
|
|
20144
|
-
src: 'fetchJoinedPromotion',
|
|
20145
|
-
onDone: {
|
|
20146
|
-
target: 'loaded',
|
|
20147
|
-
actions: 'setJoinedPromotion',
|
|
20148
|
-
},
|
|
20149
|
-
onError: {
|
|
20150
|
-
target: 'fail',
|
|
20151
|
-
},
|
|
20152
|
-
},
|
|
20153
|
-
},
|
|
20154
|
-
loaded: {
|
|
20155
|
-
on: {
|
|
20156
|
-
SELECT_PROMO: {
|
|
20157
|
-
actions: 'setSelectedPromo',
|
|
20158
|
-
},
|
|
20159
|
-
SET_AMOUNT: {
|
|
20160
|
-
actions: 'setAmount',
|
|
20161
|
-
},
|
|
20162
|
-
CONFIRM: {
|
|
20163
|
-
target: 'joinning',
|
|
20164
|
-
cond: 'isValidAmount',
|
|
20165
|
-
},
|
|
20166
|
-
},
|
|
20167
|
-
},
|
|
20168
|
-
fail: {},
|
|
20169
|
-
joinning: {},
|
|
20170
|
-
},
|
|
20171
|
-
},
|
|
20172
|
-
{
|
|
20173
|
-
actions: {
|
|
20174
|
-
setInit: assign((context, event) => {
|
|
20175
|
-
return {
|
|
20176
|
-
promotionsList: event.data,
|
|
20177
|
-
selectedPromo: context.noBonus,
|
|
20178
|
-
}
|
|
20179
|
-
}),
|
|
20180
|
-
setJoinedPromotion: assign((context, event) => {
|
|
20181
|
-
return {
|
|
20182
|
-
joinedPromotion: event.data,
|
|
20183
|
-
}
|
|
20184
|
-
}),
|
|
20185
|
-
setSelectedPromo: assign((context, event) => {
|
|
20186
|
-
return {
|
|
20187
|
-
selectedPromo: event.data,
|
|
20188
|
-
}
|
|
20189
|
-
}),
|
|
20190
|
-
setAmount: assign((context, event) => {
|
|
20191
|
-
return {
|
|
20192
|
-
amount: event.data,
|
|
20193
|
-
}
|
|
20194
|
-
}),
|
|
20195
|
-
},
|
|
20196
|
-
guards: {
|
|
20197
|
-
isValidAmount: (context, event) => {
|
|
20198
|
-
const { minimumAmount, amount } = context;
|
|
20199
|
-
return minimumAmount <= amount
|
|
20200
|
-
},
|
|
20201
|
-
},
|
|
20202
|
-
services: {
|
|
20203
|
-
fetchPromotionsList: async (context, event) => {
|
|
20204
|
-
const { data } = await request.send(payment.getPromotionsList());
|
|
20205
|
-
return data
|
|
20206
|
-
},
|
|
20207
|
-
fetchJoinedPromotion: async (context, event) => {
|
|
20208
|
-
const { data } = await request.send(payment.getJoinedPromotion());
|
|
20209
|
-
return data
|
|
20210
|
-
},
|
|
20211
|
-
},
|
|
20212
|
-
}
|
|
20213
|
-
)
|
|
20214
|
-
}
|
|
20215
|
-
|
|
20216
19691
|
var index$1 = {
|
|
20217
19692
|
...activity,
|
|
20218
19693
|
auth,
|
|
@@ -20250,7 +19725,6 @@ var index$1 = {
|
|
|
20250
19725
|
auth_otp_v2,
|
|
20251
19726
|
auth_otp_v3,
|
|
20252
19727
|
vip_table,
|
|
20253
|
-
promotions,
|
|
20254
19728
|
};
|
|
20255
19729
|
|
|
20256
19730
|
// const pickBy = require('lodash/pickBy')
|