Skip to content

Instantly share code, notes, and snippets.

View boid-com's full-sized avatar
🎯
Focusing

Boid boid-com

🎯
Focusing
View GitHub Profile
0x4fb6e037bed242155ce31a2f1f12882547a72457
@boid-com
boid-com / squirrelHandler.js
Created June 24, 2018 05:01
Squirrel shortcut fix
var path = require('path');
var spawn = require('child_process').spawn;
var debug = require('debug')('electron-squirrel-startup');
var app = require('electron').app;
var appInfo = require('../package.json')
console.log(path.resolve(path.dirname(process.execPath),'..',`app-` + appInfo.version,path.basename(process.execPath)))
var run = function(args, done) {
var updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');
const {api,rpc} = require('./eosjs')()
const print = (data) => console.log(data.transaction_id)
const err = (error) => console.error(error.toString())
const random = (min, max) => Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min) + 1)) + Math.ceil(min)
async function getPendingClaims (account) {
try {
let res = await rpc.get_table_rows({"json":true,"code":"daccustodia1","scope":"daccustodia1","table":"pendingpay","table_key":"","lower_bound":account,"upper_bound":account,"index_position":2,"key_type":"name","limit":-1,"reverse":false,"show_payer":false})
return res.rows
} catch (error) {
const env = require('./.env')
const { api, rpc } = require('./eosjs')(env.keys, 'https://jungle3.greymass.com')
const watchAccounts = [
'powerupwatch',
'vigorworker1',
'vigorworker2',
'vigorworker3',
'vigorworker4',
'vigorworker5',