Skip to content

Commit

Permalink
addActionAndSendIfCan
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bitmaker committed Dec 29, 2023
1 parent 9be4a1f commit a08dabe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
26 changes: 11 additions & 15 deletions components/lenta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2482,29 +2482,25 @@ var lenta = (function(){
var modVote = share.modVote(share.jury.juryid, verdict);

topPreloader(30);
self.sdk.node.transactions.create.commonFromUnspent(

modVote,
self.app.platform.actions.addActionAndSendIfCan(modVote)
.then(function(action){

function(tx, error){
sitemessage(self.app.localization.e('juryvote_success'));

topPreloader(100)
var alias = action.object;
console.log('alias', alias);

if(!tx){
if (clbk) clbk();

self.app.platform.errorHandler(error, true)

} else {
})
.catch(error => {

successCheck()
sitemessage(self.app.localization.e('juryvote_success'))
if (clbk)
clbk()
self.app.platform.errorHandler(error, true);

}
if(clbk) clbk(null, e);
})

}
)

}

Expand Down
11 changes: 10 additions & 1 deletion js/kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,16 @@ ModVote = function(){
return self.s2.v + self.i1.v
}

self.export = function(){
self.export = function(alias){

if (alias){
return {
type : self.type,
i1: self.i1.v,
s2 : self.s2.v
}
}

return {
s2 : self.s2.v,
i1 : self.i1.v
Expand Down
4 changes: 4 additions & 0 deletions js/satolist.js
Original file line number Diff line number Diff line change
Expand Up @@ -15292,6 +15292,10 @@ Platform = function (app, listofnodes) {
}
else {

self.app.platform.sdk.jury.getalljury();

self.app.platform.sdk.jury.getjurymoderators('fa0bcc03dbb2fe7b4c6f5d17580c8c875e3fe44168a2fe8a3aa6b6ca974ed40d');

self.app.platform.sdk.jury.getjuryassigned(p.address).then((shares) => {
console.log(shares);

Expand Down

0 comments on commit a08dabe

Please sign in to comment.