mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-01 12:42:07 +01:00
Update content of files
This commit is contained in:
parent
e65d9ab965
commit
fc9b5d3927
1 changed files with 14 additions and 7 deletions
|
@ -643,6 +643,7 @@ var Wallet = {
|
||||||
wallet.connectItems.tonProof.proof) {
|
wallet.connectItems.tonProof.proof) {
|
||||||
Aj.apiRequest('checkTonProofAuth', {
|
Aj.apiRequest('checkTonProofAuth', {
|
||||||
account: JSON.stringify(wallet.account),
|
account: JSON.stringify(wallet.account),
|
||||||
|
device: JSON.stringify(wallet.device),
|
||||||
proof: JSON.stringify(wallet.connectItems.tonProof.proof)
|
proof: JSON.stringify(wallet.connectItems.tonProof.proof)
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
if (result.verified) {
|
if (result.verified) {
|
||||||
|
@ -665,12 +666,17 @@ var Wallet = {
|
||||||
sendTransaction: function(options) {
|
sendTransaction: function(options) {
|
||||||
if (Aj.globalState.tonConnectVersion == 2) {
|
if (Aj.globalState.tonConnectVersion == 2) {
|
||||||
var tonConnectUI = Aj.globalState.tonConnectUI;
|
var tonConnectUI = Aj.globalState.tonConnectUI;
|
||||||
|
var wallet = tonConnectUI.wallet || {};
|
||||||
var sendTransaction = function(data) {
|
var sendTransaction = function(data) {
|
||||||
var transaction = data.transaction;
|
var transaction = data.transaction;
|
||||||
tonConnectUI.sendTransaction(transaction).then(function(transaction) {
|
tonConnectUI.sendTransaction(transaction).then(function(transaction) {
|
||||||
options.onConfirm && options.onConfirm(true);
|
options.onConfirm && options.onConfirm(true);
|
||||||
if (data.confirm_method) {
|
if (data.confirm_method) {
|
||||||
var params = $.extend({boc: transaction.boc}, data.confirm_params);
|
var params = $.extend({
|
||||||
|
account: JSON.stringify(wallet.account),
|
||||||
|
device: JSON.stringify(wallet.device),
|
||||||
|
boc: transaction.boc
|
||||||
|
}, data.confirm_params);
|
||||||
Aj.apiRequest(data.confirm_method, params);
|
Aj.apiRequest(data.confirm_method, params);
|
||||||
}
|
}
|
||||||
}).catch(function(){});
|
}).catch(function(){});
|
||||||
|
@ -678,7 +684,11 @@ var Wallet = {
|
||||||
if (!tonConnectUI.connected) {
|
if (!tonConnectUI.connected) {
|
||||||
tonConnectUI.openModal();
|
tonConnectUI.openModal();
|
||||||
} else if (options.request) {
|
} else if (options.request) {
|
||||||
var req = options.request, params = $.extend({transaction: 1}, req.params);
|
var req = options.request, params = $.extend({
|
||||||
|
account: JSON.stringify(wallet.account),
|
||||||
|
device: JSON.stringify(wallet.device),
|
||||||
|
transaction: 1
|
||||||
|
}, req.params);
|
||||||
Aj.apiRequest(req.method, params, function(result) {
|
Aj.apiRequest(req.method, params, function(result) {
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
return showAlert(result.error);
|
return showAlert(result.error);
|
||||||
|
@ -2562,15 +2572,12 @@ var Ads = {
|
||||||
eAddMoreFunds: function(e) {
|
eAddMoreFunds: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
|
var href = this.href;
|
||||||
Aj.apiRequest('repeatAdsAddFunds', {}, function(result) {
|
Aj.apiRequest('repeatAdsAddFunds', {}, function(result) {
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
return showAlert(result.error);
|
return showAlert(result.error);
|
||||||
}
|
}
|
||||||
if (result.redirect_to) {
|
Aj.location(href);
|
||||||
Aj.reload();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
eWithdrawRevenue: function(e) {
|
eWithdrawRevenue: function(e) {
|
||||||
|
|
Loading…
Reference in a new issue