Template.layout.helpers({
    islocked: function() {
        if(Wallet.findOne()) {
            var wallet = Wallet.findOne();

            return wallet.locked && wallet.encrypted;
        }

        return true;
    },

    synching: function() {
        if(Wallet.findOne() && Blocks.findOne()) {
            var wallet = Wallet.findOne();

            var blockcount = Blocks.findOne().blockcount;

            return wallet.blocks != blockcount;
        }

        return false;
    }
});
@@ -223,17 +223,16 @@
     sync
-h
 ing: fun
@@ -352,102 +352,635 @@
     
-var blockcount = Blocks.findOne().blockcount;%0A%0A            return wallet.block
+Meteor.call(%22get_block_hash%22, wallet.blocks, function(err, hash) %7B%0A                Meteor.call(%22get_block%22, hash, function(err, block) %7B%0A                    Session.set(%22block_time%22, block.time);%0A                %7D);%0A            %7D);%0A%0A            var block_time = Session.get('block_time');%0A%0A            if(block_time) %7B%0A                var block_date = new Date(block_time * 1000);%0A%0A                var curr_date = new Date();%0A%0A                var diff = curr_date.getTime() - block_date.getTime();%0A%0A                var second
 s 
-!
 = 
-blockcount;
+Math.abs(diff / 1000);%0A%0A                return Math.round(seconds / (60 * 60)) %3E 0;%0A%0A            %7D
 %0A   

fix syncing helper