Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement