Skip to content

Commit

Permalink
Add epic pacman loading to newsletter
Browse files Browse the repository at this point in the history
  • Loading branch information
igorshelkovenkov committed Feb 3, 2022
1 parent 3447e99 commit 466833a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"email": "[email protected]",
"url": "https://www.defichain-income.com"
},
"version": "8.12.7",
"version": "8.12.8",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
7 changes: 6 additions & 1 deletion src/app/pages/newsletter/newsletter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Pool } from '@interfaces/Dex';
import { Newsletter } from '@interfaces/Data';
import { INCOME_STATISTICS, UPDATE_NEWSLETTER } from '@interfaces/Graphql'
import { Apollo } from 'apollo-angular'
import { NgxSpinnerService } from 'ngx-spinner'

@Component({
selector: 'app-newsletter-page',
Expand All @@ -22,7 +23,7 @@ export class NewsletterComponent implements OnInit, OnChanges {
email: string;
address: string;

constructor(private apollo: Apollo) { }
constructor(private apollo: Apollo, private spinner: NgxSpinnerService) { }

ngOnInit(): void {
this.email = this.newsletter?.email;
Expand All @@ -35,6 +36,7 @@ export class NewsletterComponent implements OnInit, OnChanges {
}

save(): void {
this.spinner.show();
this.apollo.mutate({
mutation: UPDATE_NEWSLETTER,
variables : {
Expand All @@ -47,14 +49,17 @@ export class NewsletterComponent implements OnInit, OnChanges {
this.newsletter = result?.data?.updateUserNewsletter.newsletter;
this.email = this.newsletter?.email;
this.address = this.newsletter?.payingAddress;
this.spinner.hide();
this.successBackend = 'Newsletter updated';
setInterval(() => {
this.successBackend = null;
}, 5000);
} else {
this.spinner.hide();
console.log('No Date for updateUserNewsletter');
}
}, (error) => {
this.spinner.hide();
console.log(error);
this.errorBackend = error.message;
setInterval(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const environment = {
address_vaults: 'https://ocean.defichain.com/v0/mainnet/address/ADDRESS_VAULTS/vaults',
mamon_account: 'https://sync.defichain-masternode-monitor.com/v1/KEY/masternodes',
mamon_account_node: 'https://api.defichain-masternode-monitor.com/v1/masternodes/info/',
version: '8.12.7',
version: '8.12.8',
bittrex: 'https://api.bittrex.com/v3/currencies/DFI',
kucoin: 'https://api.kucoin.com/api/v1/currencies/DFI',
graphql: 'https://graphql.defichain-income.com/graphql',
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const environment = {
address_vaults: 'https://ocean.defichain.com/v0/mainnet/address/ADDRESS_VAULTS/vaults',
mamon_account: 'https://sync.defichain-masternode-monitor.com/v1/KEY/masternodes',
mamon_account_node: 'https://api.defichain-masternode-monitor.com/v1/masternodes/info/',
version: '8.12.7',
version: '8.12.8',
graphql: 'https://graphql.defichain-income.com/graphql',
// Matomo
// No tracking for local -> wrong id
Expand Down
5 changes: 5 additions & 0 deletions src/interface/Changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export class Changelog {

this.logs = new Array<Log>();

this.log = new Log();
this.log.version = '8.12.8 - 3.2.2022';
this.log.comment = 'Add epic pacman loading to newsletter';
this.logs.push(this.log);

this.log = new Log();
this.log.version = '8.12.7 - 3.2.2022';
this.log.comment = 'Add DUSD history, add better wording source address newsletter ';
Expand Down

0 comments on commit 466833a

Please sign in to comment.