Skip to content

Instantly share code, notes, and snippets.

@adsc-cloudtec
Created January 24, 2018 14:16
Show Gist options
  • Save adsc-cloudtec/034a6aef76981289aae3c17ea11e4030 to your computer and use it in GitHub Desktop.
Save adsc-cloudtec/034a6aef76981289aae3c17ea11e4030 to your computer and use it in GitHub Desktop.
this.tokens = [];
// Load wallet list from local storage
let wallets = JSON.parse(localStorage.getItem('wallets'));
let counter = 0;
wallets.forEach(function(wallet) {
// TODO: Get transport from config
let transport = new Transport(wallet.network);
this.tokenTemplates.forEach(function(template) {
setTimeout(function(template, viewTokens) {
transport.findTokens(template, function(tokens) {
console.log('tokens: ' + JSON.stringify(tokens));
viewTokens = tokens;
});
}, counter * 500, template, this.tokens);
counter++;
}, this);
}, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment