daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getOwnedVipers() {
  2.   this.isLoading = true;
  3.   cryptoViperContract.methods.ownedVipers().call({
  4.     from: this.account,
  5.   }).then((receipt) => {
  6.     for (let i = 0; i < receipt.length; i += 1) {
  7.       cryptoViperContract.methods.getViperDetails(receipt[i]).call({
  8.         from: this.account,
  9.       }).then((viper) => {
  10.         this.addViperFromReturned(viper);
  11.       }).catch((err) => {
  12.         console.log(err, 'err');
  13.       });
  14.     }
  15.     this.isLoading = false;
  16.   }).catch((err) => {
  17.     console.log(err, 'err');
  18.     this.isLoading = false;
  19.   });
  20. },
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top