@everymatrix/player-withdrawal 0.0.236 → 0.0.240
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/player-withdrawal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.240",
|
|
4
4
|
"main": "dist/player-withdrawal",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "6b0a5bd921101009e1bbfaa3fe63215a87fffc40"
|
|
40
40
|
}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import { _, addNewMessages, setLocale } from './i18n';
|
|
6
6
|
import { PlayerWithdrawalTranslations } from './translations';
|
|
7
7
|
|
|
8
|
-
export let endpoint:
|
|
9
|
-
export let session:
|
|
10
|
-
export let playerid:
|
|
8
|
+
export let endpoint:string = '';
|
|
9
|
+
export let session:string = '';
|
|
10
|
+
export let playerid:string = '';
|
|
11
11
|
export let lang:string = 'en';
|
|
12
12
|
|
|
13
|
-
let userAgent:
|
|
14
|
-
let isMobile = (getDevice(userAgent) === 'PC') ? false : true;
|
|
13
|
+
let userAgent:string = window.navigator.userAgent;
|
|
14
|
+
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
15
15
|
let isLoading:boolean = true;
|
|
16
16
|
|
|
17
17
|
let currency:string = '';
|
|
@@ -22,20 +22,16 @@
|
|
|
22
22
|
addNewMessages(item, PlayerWithdrawalTranslations[item]);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
const toggleScreen = () => {
|
|
25
|
+
const toggleScreen = ():void => {
|
|
26
26
|
window.postMessage({ type: 'ReturnToMenu' }, window.location.href);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const messageHandler = (e:any) => {
|
|
29
|
+
const messageHandler = (e:any):void => {
|
|
30
30
|
if (e.data) {
|
|
31
31
|
switch(e.data.type) {
|
|
32
32
|
case 'ProfileDetailsData':
|
|
33
33
|
currency = e.data.profileDetails.currency;
|
|
34
34
|
break;
|
|
35
|
-
|
|
36
|
-
default:
|
|
37
|
-
// do nothing
|
|
38
|
-
break;
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
switch(e.data.redirect) {
|
|
@@ -58,31 +54,26 @@
|
|
|
58
54
|
case 'mm-wm-hc-init-deposit':
|
|
59
55
|
window.postMessage({ type: 'GoToDeposit' }, window.location.href);
|
|
60
56
|
break;
|
|
61
|
-
|
|
62
|
-
default:
|
|
63
|
-
// do nothing
|
|
64
|
-
break;
|
|
65
57
|
}
|
|
66
58
|
}
|
|
67
59
|
}
|
|
68
60
|
|
|
69
|
-
const getWithdrawalIframe = () => {
|
|
70
|
-
let url = new URL(`${endpoint}/player/${playerid}/hostedcashier/initializewithdraw`);
|
|
61
|
+
const getWithdrawalIframe = ():void => {
|
|
62
|
+
let url:URL = new URL(`${endpoint}/player/${playerid}/hostedcashier/initializewithdraw`);
|
|
71
63
|
|
|
72
64
|
let options = {
|
|
73
65
|
method: "POST",
|
|
74
66
|
headers: {
|
|
75
|
-
'playerId': playerid,
|
|
76
67
|
'X-SessionId': session,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
currency,
|
|
69
|
+
amount,
|
|
70
|
+
cashierMode: 'Default',
|
|
71
|
+
IsShortCashier: false,
|
|
72
|
+
accept: 'application/json'
|
|
82
73
|
},
|
|
83
74
|
};
|
|
84
75
|
|
|
85
|
-
fetch(url, options)
|
|
76
|
+
fetch(url.href, options)
|
|
86
77
|
.then((res:any) => res.json())
|
|
87
78
|
.then((data:any) => {
|
|
88
79
|
|
|
@@ -95,7 +86,7 @@
|
|
|
95
86
|
});
|
|
96
87
|
}
|
|
97
88
|
|
|
98
|
-
const
|
|
89
|
+
const setActiveLanguage = ():void => {
|
|
99
90
|
setLocale(lang);
|
|
100
91
|
}
|
|
101
92
|
|
|
@@ -107,7 +98,7 @@
|
|
|
107
98
|
}
|
|
108
99
|
});
|
|
109
100
|
|
|
110
|
-
$: lang &&
|
|
101
|
+
$: lang && setActiveLanguage();
|
|
111
102
|
$: session && playerid && endpoint && getWithdrawalIframe();
|
|
112
103
|
</script>
|
|
113
104
|
|