mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-23 09:16:54 +01:00
Update content of files
This commit is contained in:
parent
8a26d65acc
commit
e86dba7e1e
1 changed files with 9 additions and 2 deletions
|
@ -599,6 +599,7 @@ var Login = {
|
||||||
var Wallet = {
|
var Wallet = {
|
||||||
init: function(options) {
|
init: function(options) {
|
||||||
Aj.globalState.tonConnectAuthAddress = options.address || false;
|
Aj.globalState.tonConnectAuthAddress = options.address || false;
|
||||||
|
Aj.globalState.tonConnectLoggedIn = options.logged_in || false;
|
||||||
Aj.globalState.tonConnectProof = options.ton_proof || '';
|
Aj.globalState.tonConnectProof = options.ton_proof || '';
|
||||||
Aj.globalState.tonConnectVersion = options.version || 1;
|
Aj.globalState.tonConnectVersion = options.version || 1;
|
||||||
if (Aj.globalState.tonConnectVersion == 2) {
|
if (Aj.globalState.tonConnectVersion == 2) {
|
||||||
|
@ -717,14 +718,19 @@ var Wallet = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
eTonAuth: function(e) {
|
eTonAuth: function(e) {
|
||||||
e.stopImmediatePropagation();
|
|
||||||
e.preventDefault();
|
|
||||||
if (Aj.globalState.tonConnectVersion == 2) {
|
if (Aj.globalState.tonConnectVersion == 2) {
|
||||||
var tonConnectUI = Aj.globalState.tonConnectUI;
|
var tonConnectUI = Aj.globalState.tonConnectUI;
|
||||||
if (!tonConnectUI.connected) {
|
if (!tonConnectUI.connected) {
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
e.preventDefault();
|
||||||
tonConnectUI.openModal();
|
tonConnectUI.openModal();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (Aj.globalState.tonConnectLoggedIn) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
e.preventDefault();
|
||||||
QR.showPopup({
|
QR.showPopup({
|
||||||
request: {
|
request: {
|
||||||
method: 'getTonAuthLink'
|
method: 'getTonAuthLink'
|
||||||
|
@ -2948,6 +2954,7 @@ var Stars = {
|
||||||
$('.js-buy-stars-content', Aj.state.$starsBuyPopup).html(result.content);
|
$('.js-buy-stars-content', Aj.state.$starsBuyPopup).html(result.content);
|
||||||
$('.js-buy-stars-button', Aj.state.$starsBuyPopup).html(result.button);
|
$('.js-buy-stars-button', Aj.state.$starsBuyPopup).html(result.button);
|
||||||
Aj.state.$starsBuyPopup.toggleClass('iam-sender', result.myself);
|
Aj.state.$starsBuyPopup.toggleClass('iam-sender', result.myself);
|
||||||
|
Aj.state.$starsBuyPopup.toggleClass('bot-recipient', result.to_bot);
|
||||||
Aj.state.starsPrice = result.amount;
|
Aj.state.starsPrice = result.amount;
|
||||||
Aj.state.itemTitle = result.item_title;
|
Aj.state.itemTitle = result.item_title;
|
||||||
Aj.state.$starsBuyForm.field('id').value(result.req_id);
|
Aj.state.$starsBuyForm.field('id').value(result.req_id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue