Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getOwnedVipers() {
- this.isLoading = true;
- cryptoViperContract.methods.ownedVipers().call({
- from: this.account,
- }).then((receipt) => {
- for (let i = 0; i < receipt.length; i += 1) {
- cryptoViperContract.methods.getViperDetails(receipt[i]).call({
- from: this.account,
- }).then((viper) => {
- this.addViperFromReturned(viper);
- }).catch((err) => {
- console.log(err, 'err');
- });
- }
- this.isLoading = false;
- }).catch((err) => {
- console.log(err, 'err');
- this.isLoading = false;
- });
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement