Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
accounts.forEach(function (account) {
var idx = payload.accounts.findIndex(function (elem) {
return elem.name === account.account_name || elem.account_name === account.account_name;
});
if (idx === -1) {
payload.accounts.push(account);
}
else {
var toast = {
type: 'info',
title: 'Import',
body: 'The account ' + account.account_name + ' was already imported! Skipping...',
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
_this.toaster.popAsync(toast);
}
});
payload.updatedOn = new Date();
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 10000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
LandingComponent.prototype.ngOnInit = function () {
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 10000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
DappComponent.prototype.setActions = function (abi) {
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 5000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 5000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
VoteComponent.prototype.onChartInit = function (e) {
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 10000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
ConfigComponent.prototype.ngOnInit = function () {
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 10000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
__decorate([
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 10000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
ResourcesComponent.prototype.listbw = function (account_name) {
this.config = new angular2_toaster_1.ToasterConfig({
positionClass: 'toast-top-right',
timeout: 10000,
newestOnTop: true,
tapToDismiss: true,
preventDuplicates: false,
animation: 'slideDown',
limit: 1,
});
var toast = {
type: type,
title: title,
body: body,
timeout: 10000,
showCloseButton: true,
bodyOutputType: angular2_toaster_1.BodyOutputType.TrustedHtml,
};
this.toaster.popAsync(toast);
};
SendComponent.prototype.openEditContactModal = function (contact) {