@jetthai/cuora 1.1.13-4 → 1.1.15-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 +3 -5
- package/dist/bundle.mjs +83 -617
- package/package.json +1 -1
- package/src/api/payment.js +0 -9
- package/src/machine/deposit/crypto_button.js +9 -137
- package/src/machine/deposit/loadcard_vn.js +33 -145
- package/src/machine/deposit/qrcode_v2.js +12 -168
- package/src/machine/game_favorite_v2.js +29 -24
- package/src/machine/index.js +0 -2
- package/src/machine/promotions.js +0 -139
package/dist/bundle.mjs
CHANGED
|
@@ -3845,15 +3845,6 @@ var payment = {
|
|
|
3845
3845
|
method: 'post',
|
|
3846
3846
|
params: { transferType: 'WITHDRAW', amount },
|
|
3847
3847
|
}),
|
|
3848
|
-
getPromotionsList: () => ({ url: `payment/v2/bankWallet/promotions`, method: 'get' }),
|
|
3849
|
-
applyPromotions: ({ promotionsNo, amount }) => ({
|
|
3850
|
-
url: `payment/v2/bankWallet/promotion/apply`,
|
|
3851
|
-
method: 'post',
|
|
3852
|
-
params: {
|
|
3853
|
-
promotionsNo,
|
|
3854
|
-
amount,
|
|
3855
|
-
},
|
|
3856
|
-
}),
|
|
3857
3848
|
};
|
|
3858
3849
|
|
|
3859
3850
|
var user = {
|
|
@@ -11710,7 +11701,7 @@ function game_favorite_v2 (request) {
|
|
|
11710
11701
|
return createMachine(
|
|
11711
11702
|
{
|
|
11712
11703
|
id: 'favorite',
|
|
11713
|
-
|
|
11704
|
+
initial: 'fetching',
|
|
11714
11705
|
context: {
|
|
11715
11706
|
list: [],
|
|
11716
11707
|
},
|
|
@@ -11726,31 +11717,36 @@ function game_favorite_v2 (request) {
|
|
|
11726
11717
|
},
|
|
11727
11718
|
},
|
|
11728
11719
|
},
|
|
11729
|
-
|
|
11730
|
-
|
|
11720
|
+
operation: {
|
|
11721
|
+
type: 'parallel',
|
|
11731
11722
|
states: {
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11723
|
+
adding: {
|
|
11724
|
+
initial: 'disable',
|
|
11725
|
+
states: {
|
|
11726
|
+
disable: {},
|
|
11727
|
+
enable: {
|
|
11728
|
+
invoke: {
|
|
11729
|
+
src: 'add',
|
|
11730
|
+
onDone: {},
|
|
11731
|
+
onError: {
|
|
11732
|
+
actions: 'removeFromList',
|
|
11733
|
+
},
|
|
11734
|
+
},
|
|
11739
11735
|
},
|
|
11740
11736
|
},
|
|
11741
11737
|
},
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11738
|
+
removing: {
|
|
11739
|
+
initial: 'disable',
|
|
11740
|
+
states: {
|
|
11741
|
+
disable: {},
|
|
11742
|
+
enable: {
|
|
11743
|
+
invoke: {
|
|
11744
|
+
src: 'remove',
|
|
11745
|
+
onDone: {},
|
|
11746
|
+
onError: {
|
|
11747
|
+
actions: 'addToList',
|
|
11748
|
+
},
|
|
11749
|
+
},
|
|
11754
11750
|
},
|
|
11755
11751
|
},
|
|
11756
11752
|
},
|
|
@@ -11759,12 +11755,12 @@ function game_favorite_v2 (request) {
|
|
|
11759
11755
|
},
|
|
11760
11756
|
on: {
|
|
11761
11757
|
ADD: {
|
|
11762
|
-
target: 'adding.enable',
|
|
11758
|
+
target: 'operation.adding.enable',
|
|
11763
11759
|
actions: 'addToList',
|
|
11764
11760
|
cond: 'isNotExist',
|
|
11765
11761
|
},
|
|
11766
11762
|
REMOVE: {
|
|
11767
|
-
target: 'removing.enable',
|
|
11763
|
+
target: 'operation.removing.enable',
|
|
11768
11764
|
actions: 'removeFromList',
|
|
11769
11765
|
cond: 'isExist',
|
|
11770
11766
|
},
|
|
@@ -16278,13 +16274,11 @@ function manual_vn (request) {
|
|
|
16278
16274
|
}
|
|
16279
16275
|
|
|
16280
16276
|
function loadcard_vn (request) {
|
|
16281
|
-
const { appSecret } = request.config;
|
|
16282
16277
|
return createMachine(
|
|
16283
16278
|
{
|
|
16284
16279
|
id: 'loadcard',
|
|
16285
16280
|
initial: 'loading',
|
|
16286
16281
|
context: {
|
|
16287
|
-
siteConfig: null,
|
|
16288
16282
|
cards: [],
|
|
16289
16283
|
options: [],
|
|
16290
16284
|
|
|
@@ -16295,137 +16289,26 @@ function loadcard_vn (request) {
|
|
|
16295
16289
|
|
|
16296
16290
|
calculation: null,
|
|
16297
16291
|
|
|
16298
|
-
|
|
16292
|
+
paymentDetails: [],
|
|
16299
16293
|
currentCategory: 'loadcard',
|
|
16300
16294
|
currentMethod: null,
|
|
16301
16295
|
currentPayment: null,
|
|
16296
|
+
result: null,
|
|
16302
16297
|
},
|
|
16303
16298
|
states: {
|
|
16304
16299
|
loading: {
|
|
16305
16300
|
invoke: {
|
|
16306
16301
|
src: 'fetchInitData',
|
|
16307
16302
|
onDone: {
|
|
16308
|
-
target: '
|
|
16309
|
-
actions:
|
|
16303
|
+
target: 'loaded',
|
|
16304
|
+
actions: 'setInitData',
|
|
16310
16305
|
},
|
|
16311
16306
|
onError: {
|
|
16312
16307
|
target: 'fail',
|
|
16313
16308
|
},
|
|
16314
16309
|
},
|
|
16315
16310
|
},
|
|
16316
|
-
|
|
16317
|
-
always: [{ target: 'promotionApplyMode', cond: 'isPromotionApplyMode' }, { target: 'defaultMode' }],
|
|
16318
|
-
},
|
|
16319
|
-
promotionApplyMode: {
|
|
16320
|
-
initial: 'loaded',
|
|
16321
|
-
states: {
|
|
16322
|
-
loaded: {
|
|
16323
|
-
entry: 'reset',
|
|
16324
|
-
on: {
|
|
16325
|
-
SELECT_CARD: {
|
|
16326
|
-
actions: 'setCard',
|
|
16327
|
-
},
|
|
16328
|
-
SELECT_AMOUNT: {
|
|
16329
|
-
target: 'submittable',
|
|
16330
|
-
actions: 'setAmount',
|
|
16331
|
-
},
|
|
16332
|
-
},
|
|
16333
|
-
},
|
|
16334
|
-
submittable: {
|
|
16335
|
-
on: {
|
|
16336
|
-
SELECT_AMOUNT: {
|
|
16337
|
-
actions: 'setAmount',
|
|
16338
|
-
},
|
|
16339
|
-
CONFIRM: {
|
|
16340
|
-
target: 'debouncing',
|
|
16341
|
-
},
|
|
16342
|
-
BACK: {
|
|
16343
|
-
target: 'loaded',
|
|
16344
|
-
},
|
|
16345
|
-
},
|
|
16346
|
-
},
|
|
16347
|
-
debouncing: {
|
|
16348
|
-
on: {
|
|
16349
|
-
SELECT_AMOUNT: {
|
|
16350
|
-
target: 'debouncing',
|
|
16351
|
-
actions: 'setAmount',
|
|
16352
|
-
},
|
|
16353
|
-
BACK: {
|
|
16354
|
-
target: 'loaded',
|
|
16355
|
-
},
|
|
16356
|
-
},
|
|
16357
|
-
after: {
|
|
16358
|
-
1000: {
|
|
16359
|
-
target: 'calculating',
|
|
16360
|
-
},
|
|
16361
|
-
},
|
|
16362
|
-
},
|
|
16363
|
-
calculable: {
|
|
16364
|
-
entry: 'clearCalculation',
|
|
16365
|
-
on: {
|
|
16366
|
-
SELECT_AMOUNT: {
|
|
16367
|
-
target: 'debouncing',
|
|
16368
|
-
actions: 'setAmount',
|
|
16369
|
-
},
|
|
16370
|
-
CALCULATE: {
|
|
16371
|
-
target: 'debouncing',
|
|
16372
|
-
},
|
|
16373
|
-
BACK: {
|
|
16374
|
-
target: 'loaded',
|
|
16375
|
-
},
|
|
16376
|
-
},
|
|
16377
|
-
},
|
|
16378
|
-
calculating: {
|
|
16379
|
-
invoke: {
|
|
16380
|
-
src: 'fetchCalculation',
|
|
16381
|
-
onDone: {
|
|
16382
|
-
target: 'cardInfo',
|
|
16383
|
-
actions: 'setCalculation',
|
|
16384
|
-
},
|
|
16385
|
-
onError: {
|
|
16386
|
-
target: 'calculable',
|
|
16387
|
-
},
|
|
16388
|
-
},
|
|
16389
|
-
},
|
|
16390
|
-
cardInfo: {
|
|
16391
|
-
on: {
|
|
16392
|
-
INPUT_CARD_NUMBER: {
|
|
16393
|
-
actions: 'setCardNumber',
|
|
16394
|
-
},
|
|
16395
|
-
INPUT_SERIAL_NUMBER: {
|
|
16396
|
-
actions: 'setSerialNumber',
|
|
16397
|
-
},
|
|
16398
|
-
SUBMIT: {
|
|
16399
|
-
target: 'submitting',
|
|
16400
|
-
cond: 'isSubmittable',
|
|
16401
|
-
},
|
|
16402
|
-
SELECT_CARD: {
|
|
16403
|
-
target: 'loaded',
|
|
16404
|
-
actions: 'setCard',
|
|
16405
|
-
},
|
|
16406
|
-
},
|
|
16407
|
-
},
|
|
16408
|
-
submitting: {
|
|
16409
|
-
invoke: {
|
|
16410
|
-
src: 'submitDeposit',
|
|
16411
|
-
onDone: {
|
|
16412
|
-
target: 'submitted',
|
|
16413
|
-
},
|
|
16414
|
-
onError: {
|
|
16415
|
-
target: 'cardInfo',
|
|
16416
|
-
},
|
|
16417
|
-
},
|
|
16418
|
-
},
|
|
16419
|
-
submitted: {
|
|
16420
|
-
on: {
|
|
16421
|
-
BACK: {
|
|
16422
|
-
target: 'loaded',
|
|
16423
|
-
},
|
|
16424
|
-
},
|
|
16425
|
-
},
|
|
16426
|
-
},
|
|
16427
|
-
},
|
|
16428
|
-
defaultMode: {
|
|
16311
|
+
loaded: {
|
|
16429
16312
|
entry: 'reset',
|
|
16430
16313
|
on: {
|
|
16431
16314
|
SELECT_CARD: {
|
|
@@ -16444,7 +16327,7 @@ function loadcard_vn (request) {
|
|
|
16444
16327
|
actions: 'setAmount',
|
|
16445
16328
|
},
|
|
16446
16329
|
BACK: {
|
|
16447
|
-
target: '
|
|
16330
|
+
target: 'loaded',
|
|
16448
16331
|
},
|
|
16449
16332
|
},
|
|
16450
16333
|
after: {
|
|
@@ -16465,7 +16348,7 @@ function loadcard_vn (request) {
|
|
|
16465
16348
|
target: 'debouncing',
|
|
16466
16349
|
},
|
|
16467
16350
|
BACK: {
|
|
16468
|
-
target: '
|
|
16351
|
+
target: 'loaded',
|
|
16469
16352
|
},
|
|
16470
16353
|
},
|
|
16471
16354
|
},
|
|
@@ -16487,11 +16370,17 @@ function loadcard_vn (request) {
|
|
|
16487
16370
|
target: 'debouncing',
|
|
16488
16371
|
actions: 'setAmount',
|
|
16489
16372
|
},
|
|
16490
|
-
CONFIRM:
|
|
16491
|
-
|
|
16492
|
-
|
|
16373
|
+
CONFIRM: [
|
|
16374
|
+
{
|
|
16375
|
+
target: 'submitting',
|
|
16376
|
+
cond: 'jumpLinkEnable',
|
|
16377
|
+
},
|
|
16378
|
+
{
|
|
16379
|
+
target: 'cardInfo',
|
|
16380
|
+
},
|
|
16381
|
+
],
|
|
16493
16382
|
BACK: {
|
|
16494
|
-
target: '
|
|
16383
|
+
target: 'loaded',
|
|
16495
16384
|
},
|
|
16496
16385
|
CLEAR_CALCULATION: {
|
|
16497
16386
|
target: 'debouncing',
|
|
@@ -16512,7 +16401,7 @@ function loadcard_vn (request) {
|
|
|
16512
16401
|
cond: 'isSubmittable',
|
|
16513
16402
|
},
|
|
16514
16403
|
SELECT_CARD: {
|
|
16515
|
-
target: '
|
|
16404
|
+
target: 'loaded',
|
|
16516
16405
|
actions: 'setCard',
|
|
16517
16406
|
},
|
|
16518
16407
|
},
|
|
@@ -16522,6 +16411,7 @@ function loadcard_vn (request) {
|
|
|
16522
16411
|
src: 'submitDeposit',
|
|
16523
16412
|
onDone: {
|
|
16524
16413
|
target: 'submitted',
|
|
16414
|
+
actions: 'setResult',
|
|
16525
16415
|
},
|
|
16526
16416
|
onError: {
|
|
16527
16417
|
target: 'cardInfo',
|
|
@@ -16531,7 +16421,7 @@ function loadcard_vn (request) {
|
|
|
16531
16421
|
submitted: {
|
|
16532
16422
|
on: {
|
|
16533
16423
|
BACK: {
|
|
16534
|
-
target: '
|
|
16424
|
+
target: 'loaded',
|
|
16535
16425
|
},
|
|
16536
16426
|
},
|
|
16537
16427
|
},
|
|
@@ -16548,22 +16438,16 @@ function loadcard_vn (request) {
|
|
|
16548
16438
|
}
|
|
16549
16439
|
}),
|
|
16550
16440
|
setInitData: assign((context, event) => {
|
|
16551
|
-
const
|
|
16552
|
-
const cards =
|
|
16441
|
+
const paymentDetails = event.data;
|
|
16442
|
+
const cards = paymentDetails.filter((element) => element.category === context.currentCategory);
|
|
16553
16443
|
return {
|
|
16554
|
-
|
|
16444
|
+
paymentDetails,
|
|
16555
16445
|
cards,
|
|
16556
16446
|
selectedCard: cards[0],
|
|
16557
16447
|
currentMethod: cards[0].method,
|
|
16558
16448
|
options: cards[0].optional,
|
|
16559
16449
|
}
|
|
16560
16450
|
}),
|
|
16561
|
-
preset: assign((context, event) => {
|
|
16562
|
-
const { siteConfig } = event.data;
|
|
16563
|
-
return {
|
|
16564
|
-
siteConfig,
|
|
16565
|
-
}
|
|
16566
|
-
}),
|
|
16567
16451
|
setCard: assign((context, event) => {
|
|
16568
16452
|
return {
|
|
16569
16453
|
selectedCard: event.data,
|
|
@@ -16594,24 +16478,25 @@ function loadcard_vn (request) {
|
|
|
16594
16478
|
calculation: null,
|
|
16595
16479
|
}
|
|
16596
16480
|
}),
|
|
16481
|
+
setResult: assign((context, event) => {
|
|
16482
|
+
return {
|
|
16483
|
+
result: event.data,
|
|
16484
|
+
}
|
|
16485
|
+
}),
|
|
16597
16486
|
},
|
|
16598
16487
|
guards: {
|
|
16599
|
-
isPromotionApplyMode: (context, event) => {
|
|
16600
|
-
return context.siteConfig?.promotionApplyMode === '1'
|
|
16601
|
-
},
|
|
16602
16488
|
isSubmittable: (context, event) => {
|
|
16603
16489
|
const { cardNumber, serialNumber } = context;
|
|
16604
16490
|
return cardNumber && serialNumber
|
|
16605
16491
|
},
|
|
16492
|
+
jumpLinkEnable: (context, event) => {
|
|
16493
|
+
const { selectedCard } = context;
|
|
16494
|
+
return selectedCard.jumpLinkEnable === 1
|
|
16495
|
+
},
|
|
16606
16496
|
},
|
|
16607
16497
|
services: {
|
|
16608
16498
|
fetchInitData: async (context, event) => {
|
|
16609
|
-
|
|
16610
|
-
request.send(common$1.getConfig({ appSecret })),
|
|
16611
|
-
request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
|
|
16612
|
-
]);
|
|
16613
|
-
const siteConfig = JSON.parse(window.atob(config));
|
|
16614
|
-
return { siteConfig, paymentDetail }
|
|
16499
|
+
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
16615
16500
|
},
|
|
16616
16501
|
fetchCalculation: async (context, event) => {
|
|
16617
16502
|
const { currentMethod, selectedAmount } = context;
|
|
@@ -16844,13 +16729,11 @@ function qrcode_vn (request) {
|
|
|
16844
16729
|
}
|
|
16845
16730
|
|
|
16846
16731
|
function qrcode_v2 (request) {
|
|
16847
|
-
const { appSecret } = request.config;
|
|
16848
16732
|
return createMachine(
|
|
16849
16733
|
{
|
|
16850
16734
|
id: 'qrcode',
|
|
16851
16735
|
initial: 'loading',
|
|
16852
16736
|
context: {
|
|
16853
|
-
siteConfig: null,
|
|
16854
16737
|
qrcodes: null,
|
|
16855
16738
|
options: null,
|
|
16856
16739
|
|
|
@@ -16859,7 +16742,7 @@ function qrcode_v2 (request) {
|
|
|
16859
16742
|
|
|
16860
16743
|
calculation: null,
|
|
16861
16744
|
|
|
16862
|
-
|
|
16745
|
+
paymentDetails: [],
|
|
16863
16746
|
currentCategory: 'qrcode',
|
|
16864
16747
|
currentMethod: null,
|
|
16865
16748
|
|
|
@@ -16872,152 +16755,15 @@ function qrcode_v2 (request) {
|
|
|
16872
16755
|
invoke: {
|
|
16873
16756
|
src: 'fetchInitData',
|
|
16874
16757
|
onDone: {
|
|
16875
|
-
target: '
|
|
16876
|
-
actions:
|
|
16758
|
+
target: 'loaded',
|
|
16759
|
+
actions: 'setInitData',
|
|
16877
16760
|
},
|
|
16878
16761
|
onError: {
|
|
16879
16762
|
target: 'fail',
|
|
16880
16763
|
},
|
|
16881
16764
|
},
|
|
16882
16765
|
},
|
|
16883
|
-
|
|
16884
|
-
always: [{ target: 'promotionApplyMode', cond: 'isPromotionApplyMode' }, { target: 'defaultMode' }],
|
|
16885
|
-
},
|
|
16886
|
-
promotionApplyMode: {
|
|
16887
|
-
initial: 'loaded',
|
|
16888
|
-
states: {
|
|
16889
|
-
loaded: {
|
|
16890
|
-
entry: 'reset',
|
|
16891
|
-
on: {
|
|
16892
|
-
SELECT_QRCODE: {
|
|
16893
|
-
actions: 'setQrcode',
|
|
16894
|
-
},
|
|
16895
|
-
SELECT_AMOUNT: [
|
|
16896
|
-
{
|
|
16897
|
-
target: 'submittable',
|
|
16898
|
-
actions: 'addAmount',
|
|
16899
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16900
|
-
},
|
|
16901
|
-
{
|
|
16902
|
-
target: 'submittable',
|
|
16903
|
-
actions: 'setAmount',
|
|
16904
|
-
},
|
|
16905
|
-
],
|
|
16906
|
-
KEY_IN: {
|
|
16907
|
-
actions: 'setAmount',
|
|
16908
|
-
},
|
|
16909
|
-
},
|
|
16910
|
-
},
|
|
16911
|
-
submittable: {
|
|
16912
|
-
on: {
|
|
16913
|
-
SELECT_AMOUNT: [
|
|
16914
|
-
{
|
|
16915
|
-
actions: 'addAmount',
|
|
16916
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16917
|
-
},
|
|
16918
|
-
{
|
|
16919
|
-
actions: 'setAmount',
|
|
16920
|
-
},
|
|
16921
|
-
],
|
|
16922
|
-
KEY_IN: {
|
|
16923
|
-
actions: 'setAmount',
|
|
16924
|
-
},
|
|
16925
|
-
CONFIRM: {
|
|
16926
|
-
target: 'debouncing',
|
|
16927
|
-
},
|
|
16928
|
-
BACK: {
|
|
16929
|
-
target: 'loaded',
|
|
16930
|
-
},
|
|
16931
|
-
},
|
|
16932
|
-
},
|
|
16933
|
-
debouncing: {
|
|
16934
|
-
on: {
|
|
16935
|
-
SELECT_AMOUNT: [
|
|
16936
|
-
{
|
|
16937
|
-
target: 'debouncing',
|
|
16938
|
-
actions: 'addAmount',
|
|
16939
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16940
|
-
},
|
|
16941
|
-
{
|
|
16942
|
-
target: 'debouncing',
|
|
16943
|
-
actions: 'setAmount',
|
|
16944
|
-
},
|
|
16945
|
-
],
|
|
16946
|
-
KEY_IN: {
|
|
16947
|
-
target: 'debouncing',
|
|
16948
|
-
actions: 'setAmount',
|
|
16949
|
-
},
|
|
16950
|
-
BACK: {
|
|
16951
|
-
target: 'loaded',
|
|
16952
|
-
},
|
|
16953
|
-
},
|
|
16954
|
-
after: {
|
|
16955
|
-
1000: {
|
|
16956
|
-
target: 'calculating',
|
|
16957
|
-
},
|
|
16958
|
-
},
|
|
16959
|
-
},
|
|
16960
|
-
calculable: {
|
|
16961
|
-
entry: 'clearCalculation',
|
|
16962
|
-
on: {
|
|
16963
|
-
SELECT_AMOUNT: [
|
|
16964
|
-
{
|
|
16965
|
-
target: 'debouncing',
|
|
16966
|
-
actions: 'addAmount',
|
|
16967
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
16968
|
-
},
|
|
16969
|
-
{
|
|
16970
|
-
target: 'debouncing',
|
|
16971
|
-
actions: 'setAmount',
|
|
16972
|
-
},
|
|
16973
|
-
],
|
|
16974
|
-
KEY_IN: {
|
|
16975
|
-
target: 'debouncing',
|
|
16976
|
-
actions: 'setAmount',
|
|
16977
|
-
},
|
|
16978
|
-
CALCULATE: {
|
|
16979
|
-
target: 'debouncing',
|
|
16980
|
-
},
|
|
16981
|
-
BACK: {
|
|
16982
|
-
target: 'loaded',
|
|
16983
|
-
},
|
|
16984
|
-
},
|
|
16985
|
-
},
|
|
16986
|
-
calculating: {
|
|
16987
|
-
invoke: {
|
|
16988
|
-
src: 'fetchCalculation',
|
|
16989
|
-
onDone: {
|
|
16990
|
-
target: 'submitting',
|
|
16991
|
-
actions: 'setCalculation',
|
|
16992
|
-
},
|
|
16993
|
-
onError: {
|
|
16994
|
-
target: 'calculable',
|
|
16995
|
-
},
|
|
16996
|
-
},
|
|
16997
|
-
},
|
|
16998
|
-
submitting: {
|
|
16999
|
-
invoke: {
|
|
17000
|
-
src: 'submitDeposit',
|
|
17001
|
-
onDone: {
|
|
17002
|
-
target: 'submitted',
|
|
17003
|
-
actions: 'setResult',
|
|
17004
|
-
},
|
|
17005
|
-
onError: {
|
|
17006
|
-
target: 'submittable',
|
|
17007
|
-
},
|
|
17008
|
-
},
|
|
17009
|
-
},
|
|
17010
|
-
submitted: {
|
|
17011
|
-
on: {
|
|
17012
|
-
SELECT_QRCODE: {
|
|
17013
|
-
target: 'loaded',
|
|
17014
|
-
actions: 'setQrcode',
|
|
17015
|
-
},
|
|
17016
|
-
},
|
|
17017
|
-
},
|
|
17018
|
-
},
|
|
17019
|
-
},
|
|
17020
|
-
defaultMode: {
|
|
16766
|
+
loaded: {
|
|
17021
16767
|
entry: 'reset',
|
|
17022
16768
|
on: {
|
|
17023
16769
|
SELECT_QRCODE: {
|
|
@@ -17058,7 +16804,7 @@ function qrcode_v2 (request) {
|
|
|
17058
16804
|
actions: 'setAmount',
|
|
17059
16805
|
},
|
|
17060
16806
|
BACK: {
|
|
17061
|
-
target: '
|
|
16807
|
+
target: 'loaded',
|
|
17062
16808
|
},
|
|
17063
16809
|
},
|
|
17064
16810
|
after: {
|
|
@@ -17090,7 +16836,7 @@ function qrcode_v2 (request) {
|
|
|
17090
16836
|
target: 'debouncing',
|
|
17091
16837
|
},
|
|
17092
16838
|
BACK: {
|
|
17093
|
-
target: '
|
|
16839
|
+
target: 'loaded',
|
|
17094
16840
|
},
|
|
17095
16841
|
},
|
|
17096
16842
|
},
|
|
@@ -17127,7 +16873,7 @@ function qrcode_v2 (request) {
|
|
|
17127
16873
|
target: 'submitting',
|
|
17128
16874
|
},
|
|
17129
16875
|
BACK: {
|
|
17130
|
-
target: '
|
|
16876
|
+
target: 'loaded',
|
|
17131
16877
|
},
|
|
17132
16878
|
CLEAR_CALCULATION: {
|
|
17133
16879
|
target: 'debouncing',
|
|
@@ -17150,7 +16896,7 @@ function qrcode_v2 (request) {
|
|
|
17150
16896
|
submitted: {
|
|
17151
16897
|
on: {
|
|
17152
16898
|
SELECT_QRCODE: {
|
|
17153
|
-
target: '
|
|
16899
|
+
target: 'loaded',
|
|
17154
16900
|
actions: 'setQrcode',
|
|
17155
16901
|
},
|
|
17156
16902
|
},
|
|
@@ -17166,11 +16912,11 @@ function qrcode_v2 (request) {
|
|
|
17166
16912
|
}
|
|
17167
16913
|
}),
|
|
17168
16914
|
setInitData: assign((context, event) => {
|
|
17169
|
-
const
|
|
17170
|
-
const qrcodes =
|
|
16915
|
+
const paymentDetails = event.data;
|
|
16916
|
+
const qrcodes = paymentDetails.filter((element) => element.category === context.currentCategory);
|
|
17171
16917
|
|
|
17172
16918
|
return {
|
|
17173
|
-
|
|
16919
|
+
paymentDetails,
|
|
17174
16920
|
qrcodes,
|
|
17175
16921
|
selectedQrcode: qrcodes[0],
|
|
17176
16922
|
currentMethod: qrcodes[0].method,
|
|
@@ -17178,12 +16924,6 @@ function qrcode_v2 (request) {
|
|
|
17178
16924
|
grandTotalEnable: qrcodes[0].grandTotalEnable,
|
|
17179
16925
|
}
|
|
17180
16926
|
}),
|
|
17181
|
-
preset: assign((context, event) => {
|
|
17182
|
-
const { siteConfig } = event.data;
|
|
17183
|
-
return {
|
|
17184
|
-
siteConfig,
|
|
17185
|
-
}
|
|
17186
|
-
}),
|
|
17187
16927
|
setQrcode: assign((context, event) => {
|
|
17188
16928
|
return {
|
|
17189
16929
|
selectedQrcode: event.data,
|
|
@@ -17214,19 +16954,9 @@ function qrcode_v2 (request) {
|
|
|
17214
16954
|
}
|
|
17215
16955
|
}),
|
|
17216
16956
|
},
|
|
17217
|
-
guards: {
|
|
17218
|
-
isPromotionApplyMode: (context, event) => {
|
|
17219
|
-
return context.siteConfig?.promotionApplyMode === '1'
|
|
17220
|
-
},
|
|
17221
|
-
},
|
|
17222
16957
|
services: {
|
|
17223
16958
|
fetchInitData: async (context, event) => {
|
|
17224
|
-
|
|
17225
|
-
request.send(common$1.getConfig({ appSecret })),
|
|
17226
|
-
request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
|
|
17227
|
-
]);
|
|
17228
|
-
const siteConfig = JSON.parse(window.atob(config));
|
|
17229
|
-
return { siteConfig, paymentDetail }
|
|
16959
|
+
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
17230
16960
|
},
|
|
17231
16961
|
fetchCalculation: async (context, event) => {
|
|
17232
16962
|
const { currentMethod, selectedAmount } = context;
|
|
@@ -18120,13 +17850,11 @@ function crypto (request) {
|
|
|
18120
17850
|
}
|
|
18121
17851
|
|
|
18122
17852
|
function crypto_button (request) {
|
|
18123
|
-
const { appSecret } = request.config;
|
|
18124
17853
|
return createMachine(
|
|
18125
17854
|
{
|
|
18126
17855
|
id: 'crypro_button',
|
|
18127
17856
|
initial: 'loading',
|
|
18128
17857
|
context: {
|
|
18129
|
-
siteConfig: null,
|
|
18130
17858
|
paymentDetails: [],
|
|
18131
17859
|
|
|
18132
17860
|
channels: [],
|
|
@@ -18150,127 +17878,17 @@ function crypto_button (request) {
|
|
|
18150
17878
|
states: {
|
|
18151
17879
|
loading: {
|
|
18152
17880
|
invoke: {
|
|
18153
|
-
src: '
|
|
17881
|
+
src: 'fetchPayments',
|
|
18154
17882
|
onDone: {
|
|
18155
|
-
target: '
|
|
18156
|
-
actions:
|
|
17883
|
+
target: 'loaded',
|
|
17884
|
+
actions: 'setCryptos',
|
|
18157
17885
|
},
|
|
18158
17886
|
onError: {
|
|
18159
17887
|
target: 'fail',
|
|
18160
17888
|
},
|
|
18161
17889
|
},
|
|
18162
17890
|
},
|
|
18163
|
-
|
|
18164
|
-
always: [{ target: 'promotionApplyMode', cond: 'isPromotionApplyMode' }, { target: 'defaultMode' }],
|
|
18165
|
-
},
|
|
18166
|
-
promotionApplyMode: {
|
|
18167
|
-
initial: 'loaded',
|
|
18168
|
-
states: {
|
|
18169
|
-
loaded: {
|
|
18170
|
-
entry: 'reset',
|
|
18171
|
-
on: {
|
|
18172
|
-
SET_CHANNEL: {
|
|
18173
|
-
actions: 'setChannel',
|
|
18174
|
-
},
|
|
18175
|
-
SET_CRYPTO: {
|
|
18176
|
-
actions: 'setCrypto',
|
|
18177
|
-
},
|
|
18178
|
-
SET_NETWORK: {
|
|
18179
|
-
actions: 'setNetwork',
|
|
18180
|
-
},
|
|
18181
|
-
SET_ADDRESS: {
|
|
18182
|
-
actions: 'setAddress',
|
|
18183
|
-
},
|
|
18184
|
-
CONFIRM: {
|
|
18185
|
-
target: 'selecting',
|
|
18186
|
-
cond: 'isConfirmable',
|
|
18187
|
-
},
|
|
18188
|
-
},
|
|
18189
|
-
},
|
|
18190
|
-
selecting: {
|
|
18191
|
-
entry: 'reset',
|
|
18192
|
-
on: {
|
|
18193
|
-
SELECT_AMOUNT: [
|
|
18194
|
-
{
|
|
18195
|
-
actions: 'addAmount',
|
|
18196
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
18197
|
-
},
|
|
18198
|
-
{
|
|
18199
|
-
actions: 'setAmount',
|
|
18200
|
-
},
|
|
18201
|
-
],
|
|
18202
|
-
KEY_IN: {
|
|
18203
|
-
actions: 'setAmount',
|
|
18204
|
-
},
|
|
18205
|
-
SUBMIT: {
|
|
18206
|
-
target: 'debouncing',
|
|
18207
|
-
},
|
|
18208
|
-
BACK: {
|
|
18209
|
-
target: 'loaded',
|
|
18210
|
-
},
|
|
18211
|
-
CLEAR_ALL: {
|
|
18212
|
-
actions: 'reset',
|
|
18213
|
-
},
|
|
18214
|
-
},
|
|
18215
|
-
},
|
|
18216
|
-
debouncing: {
|
|
18217
|
-
on: {
|
|
18218
|
-
SELECT_AMOUNT: [
|
|
18219
|
-
{
|
|
18220
|
-
target: 'debouncing',
|
|
18221
|
-
actions: 'addAmount',
|
|
18222
|
-
cond: (context, event) => context.grandTotalEnable === 1,
|
|
18223
|
-
},
|
|
18224
|
-
{
|
|
18225
|
-
target: 'debouncing',
|
|
18226
|
-
actions: 'setAmount',
|
|
18227
|
-
},
|
|
18228
|
-
],
|
|
18229
|
-
KEY_IN: {
|
|
18230
|
-
target: 'debouncing',
|
|
18231
|
-
actions: 'setAmount',
|
|
18232
|
-
},
|
|
18233
|
-
BACK: {
|
|
18234
|
-
target: 'loaded',
|
|
18235
|
-
},
|
|
18236
|
-
CLEAR_ALL: {
|
|
18237
|
-
actions: 'reset',
|
|
18238
|
-
},
|
|
18239
|
-
},
|
|
18240
|
-
after: {
|
|
18241
|
-
1000: {
|
|
18242
|
-
target: 'calculating',
|
|
18243
|
-
},
|
|
18244
|
-
},
|
|
18245
|
-
},
|
|
18246
|
-
calculating: {
|
|
18247
|
-
invoke: {
|
|
18248
|
-
src: 'fetchCalculation',
|
|
18249
|
-
onDone: {
|
|
18250
|
-
target: 'submitting',
|
|
18251
|
-
actions: 'setCalculation',
|
|
18252
|
-
},
|
|
18253
|
-
onError: {
|
|
18254
|
-
target: 'selecting',
|
|
18255
|
-
actions: 'reset',
|
|
18256
|
-
},
|
|
18257
|
-
},
|
|
18258
|
-
},
|
|
18259
|
-
submitting: {
|
|
18260
|
-
invoke: {
|
|
18261
|
-
src: 'submitDeposit',
|
|
18262
|
-
onDone: {
|
|
18263
|
-
target: '#crypro_button.submitted',
|
|
18264
|
-
actions: 'setResult',
|
|
18265
|
-
},
|
|
18266
|
-
onError: {
|
|
18267
|
-
target: 'selecting',
|
|
18268
|
-
},
|
|
18269
|
-
},
|
|
18270
|
-
},
|
|
18271
|
-
},
|
|
18272
|
-
},
|
|
18273
|
-
defaultMode: {
|
|
17891
|
+
loaded: {
|
|
18274
17892
|
on: {
|
|
18275
17893
|
SET_CHANNEL: {
|
|
18276
17894
|
actions: 'setChannel',
|
|
@@ -18310,7 +17928,7 @@ function crypto_button (request) {
|
|
|
18310
17928
|
actions: 'setAmount',
|
|
18311
17929
|
},
|
|
18312
17930
|
BACK: {
|
|
18313
|
-
target: '
|
|
17931
|
+
target: 'loaded',
|
|
18314
17932
|
},
|
|
18315
17933
|
},
|
|
18316
17934
|
},
|
|
@@ -18405,9 +18023,8 @@ function crypto_button (request) {
|
|
|
18405
18023
|
calculation: null,
|
|
18406
18024
|
}
|
|
18407
18025
|
}),
|
|
18408
|
-
|
|
18409
|
-
const {
|
|
18410
|
-
const cryptos = paymentDetail?.map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || [];
|
|
18026
|
+
setCryptos: assign((context, event) => {
|
|
18027
|
+
const cryptos = event.data?.map?.((crypto) => ({ ...crypto, label: crypto.channel, value: crypto.method, icon: crypto.channel })) || [];
|
|
18411
18028
|
const currentPayment = cryptos.find((element) => element.category === context.currentCategory);
|
|
18412
18029
|
const channels = cryptos.map((item, i) => ({ ...item, label: `Channel ${padStart_1(String(i + 1), 2, '0')}`, icon: 'channel' }));
|
|
18413
18030
|
const defaultNetworks =
|
|
@@ -18431,12 +18048,6 @@ function crypto_button (request) {
|
|
|
18431
18048
|
options,
|
|
18432
18049
|
}
|
|
18433
18050
|
}),
|
|
18434
|
-
preset: assign((context, event) => {
|
|
18435
|
-
const { siteConfig } = event.data;
|
|
18436
|
-
return {
|
|
18437
|
-
siteConfig,
|
|
18438
|
-
}
|
|
18439
|
-
}),
|
|
18440
18051
|
setChannel: assign((context, event) => {
|
|
18441
18052
|
const { cryptos } = context;
|
|
18442
18053
|
const selectedCrypto = cryptos.find((crypto) => crypto.method === event.data.value);
|
|
@@ -18516,9 +18127,6 @@ function crypto_button (request) {
|
|
|
18516
18127
|
}),
|
|
18517
18128
|
},
|
|
18518
18129
|
guards: {
|
|
18519
|
-
isPromotionApplyMode: (context, event) => {
|
|
18520
|
-
return context.siteConfig?.promotionApplyMode === '1'
|
|
18521
|
-
},
|
|
18522
18130
|
isConfirmable: (context, event) => {
|
|
18523
18131
|
const { selectedCrypto, selectedNetwork } = context;
|
|
18524
18132
|
return selectedCrypto && selectedNetwork
|
|
@@ -18529,13 +18137,8 @@ function crypto_button (request) {
|
|
|
18529
18137
|
},
|
|
18530
18138
|
},
|
|
18531
18139
|
services: {
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
request.send(common$1.getConfig({ appSecret })),
|
|
18535
|
-
request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' })),
|
|
18536
|
-
]);
|
|
18537
|
-
const siteConfig = JSON.parse(window.atob(config));
|
|
18538
|
-
return { siteConfig, paymentDetail }
|
|
18140
|
+
fetchPayments: async (context, event) => {
|
|
18141
|
+
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
18539
18142
|
},
|
|
18540
18143
|
fetchCalculation: async (context, event) => {
|
|
18541
18144
|
const { selectedCrypto, selectedAmount } = context;
|
|
@@ -20107,142 +19710,6 @@ function vip_table (request) {
|
|
|
20107
19710
|
)
|
|
20108
19711
|
}
|
|
20109
19712
|
|
|
20110
|
-
function promotions (request) {
|
|
20111
|
-
return createMachine(
|
|
20112
|
-
{
|
|
20113
|
-
id: 'promotions',
|
|
20114
|
-
initial: 'loading',
|
|
20115
|
-
context: {
|
|
20116
|
-
noBonus: {
|
|
20117
|
-
promotionsNo: 'No Bonus',
|
|
20118
|
-
title: 'No Bonus',
|
|
20119
|
-
adSmallUrl: [
|
|
20120
|
-
{
|
|
20121
|
-
url: '~/assets/images/deposit/deposit_img_nobonus_normal.png',
|
|
20122
|
-
name: 'No Bonus',
|
|
20123
|
-
},
|
|
20124
|
-
],
|
|
20125
|
-
descrip: 'no_bonus',
|
|
20126
|
-
minimumAmount: 0,
|
|
20127
|
-
turnoverLimitMultiple: 1,
|
|
20128
|
-
promotionDetail: [],
|
|
20129
|
-
withdrawLimitDetail: [],
|
|
20130
|
-
limitGameDetail: [],
|
|
20131
|
-
},
|
|
20132
|
-
oldTargetTurnoverLimit: 0,
|
|
20133
|
-
newTargetTurnoverLimit: 0,
|
|
20134
|
-
promotionsList: [],
|
|
20135
|
-
selectedPromo: {},
|
|
20136
|
-
joinedPromotion: null,
|
|
20137
|
-
},
|
|
20138
|
-
states: {
|
|
20139
|
-
loading: {
|
|
20140
|
-
invoke: {
|
|
20141
|
-
src: 'fetchInitData',
|
|
20142
|
-
onDone: {
|
|
20143
|
-
target: 'loaded',
|
|
20144
|
-
actions: 'setInitData',
|
|
20145
|
-
},
|
|
20146
|
-
onError: {
|
|
20147
|
-
target: 'fail',
|
|
20148
|
-
},
|
|
20149
|
-
},
|
|
20150
|
-
},
|
|
20151
|
-
loaded: {
|
|
20152
|
-
on: {
|
|
20153
|
-
SELECT_PROMO: {
|
|
20154
|
-
actions: ['reset', 'setSelectedPromo'],
|
|
20155
|
-
},
|
|
20156
|
-
SET_AMOUNT: {
|
|
20157
|
-
actions: 'setAmount',
|
|
20158
|
-
},
|
|
20159
|
-
JOIN: {
|
|
20160
|
-
target: 'check',
|
|
20161
|
-
cond: 'isValidAmount',
|
|
20162
|
-
},
|
|
20163
|
-
},
|
|
20164
|
-
},
|
|
20165
|
-
check: {
|
|
20166
|
-
entry: 'preset',
|
|
20167
|
-
on: {
|
|
20168
|
-
CONFIRM: {
|
|
20169
|
-
target: 'joinning',
|
|
20170
|
-
},
|
|
20171
|
-
BACK: {
|
|
20172
|
-
target: 'loaded',
|
|
20173
|
-
},
|
|
20174
|
-
},
|
|
20175
|
-
},
|
|
20176
|
-
joinning: {
|
|
20177
|
-
invoke: {
|
|
20178
|
-
src: 'applyPromotion',
|
|
20179
|
-
onDone: {
|
|
20180
|
-
target: 'joined',
|
|
20181
|
-
},
|
|
20182
|
-
onError: {
|
|
20183
|
-
target: 'fail',
|
|
20184
|
-
},
|
|
20185
|
-
},
|
|
20186
|
-
},
|
|
20187
|
-
joined: {},
|
|
20188
|
-
fail: {},
|
|
20189
|
-
},
|
|
20190
|
-
},
|
|
20191
|
-
{
|
|
20192
|
-
actions: {
|
|
20193
|
-
setInitData: assign((context, event) => {
|
|
20194
|
-
const { userInfo, promotionsList } = event.data;
|
|
20195
|
-
const { noBonus } = context;
|
|
20196
|
-
return {
|
|
20197
|
-
promotionsList,
|
|
20198
|
-
userInfo,
|
|
20199
|
-
selectedPromo: noBonus,
|
|
20200
|
-
}
|
|
20201
|
-
}),
|
|
20202
|
-
setSelectedPromo: assign((context, event) => {
|
|
20203
|
-
return {
|
|
20204
|
-
selectedPromo: event.data,
|
|
20205
|
-
}
|
|
20206
|
-
}),
|
|
20207
|
-
setAmount: assign((context, event) => {
|
|
20208
|
-
return {
|
|
20209
|
-
amount: event.data,
|
|
20210
|
-
}
|
|
20211
|
-
}),
|
|
20212
|
-
reset: assign((context, event) => {
|
|
20213
|
-
return {
|
|
20214
|
-
amount: null,
|
|
20215
|
-
}
|
|
20216
|
-
}),
|
|
20217
|
-
preset: assign((context, event) => {
|
|
20218
|
-
const { userInfo, selectedPromo, amount } = context;
|
|
20219
|
-
const { turnoverLimitMultiple } = selectedPromo;
|
|
20220
|
-
return {
|
|
20221
|
-
oldTargetTurnoverLimit: userInfo.target_withdraw_limit,
|
|
20222
|
-
newTargetTurnoverLimit: parseFloat(`${amount}`) * parseFloat(`${turnoverLimitMultiple}`),
|
|
20223
|
-
}
|
|
20224
|
-
}),
|
|
20225
|
-
},
|
|
20226
|
-
guards: {
|
|
20227
|
-
isValidAmount: (context, event) => {
|
|
20228
|
-
const { selectedPromo, amount } = context;
|
|
20229
|
-
return selectedPromo.minimumAmount <= amount
|
|
20230
|
-
},
|
|
20231
|
-
},
|
|
20232
|
-
services: {
|
|
20233
|
-
fetchInitData: async (context, event) => {
|
|
20234
|
-
const [userInfo, promotionsList] = await Promise.all([request.send(user.getUserInfo()), request.send(payment.getPromotionsList())]);
|
|
20235
|
-
return { userInfo, promotionsList }
|
|
20236
|
-
},
|
|
20237
|
-
applyPromotion: async (context, event) => {
|
|
20238
|
-
const { selectedPromo, amount } = context;
|
|
20239
|
-
return await request.send(payment.applyPromotions({ promotionsNo: selectedPromo.promotionsNo, amount: parseFloat(amount) }))
|
|
20240
|
-
},
|
|
20241
|
-
},
|
|
20242
|
-
}
|
|
20243
|
-
)
|
|
20244
|
-
}
|
|
20245
|
-
|
|
20246
19713
|
var index$1 = {
|
|
20247
19714
|
...activity,
|
|
20248
19715
|
auth,
|
|
@@ -20280,7 +19747,6 @@ var index$1 = {
|
|
|
20280
19747
|
auth_otp_v2,
|
|
20281
19748
|
auth_otp_v3,
|
|
20282
19749
|
vip_table,
|
|
20283
|
-
promotions,
|
|
20284
19750
|
};
|
|
20285
19751
|
|
|
20286
19752
|
// const pickBy = require('lodash/pickBy')
|