Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw [
new TransactionError(
'Invalid transaction timestamp. Timestamp is in the future',
transaction.id,
'.timestamp'
),
];
}
const { transactionsResponses } = await this.verifyTransactions([
transaction,
]);
if (transactionsResponses[0].status === TransactionStatus.OK) {
return this.addVerifiedTransaction(transaction);
}
if (transactionsResponses[0].status === TransactionStatus.PENDING) {
return this.addMultisignatureTransaction(transaction);
}
this.logger.info(`Transaction pool - ${transactionsResponses[0].errors}`);
throw transactionsResponses[0].errors;
// Register to braodcaster
}
transaction.id,
'.timestamp',
),
];
}
if (transaction.bundled) {
return this.addBundledTransaction(transaction);
}
const { transactionsResponses } = await this.verifyTransactions([
transaction,
]);
if (transactionsResponses[0].status === TransactionStatus.OK) {
return this.addVerifiedTransaction(transaction);
}
if (transactionsResponses[0].status === TransactionStatus.PENDING) {
return this.addMultisignatureTransaction(transaction);
}
this.logger.info(`Transaction pool - ${transactionsResponses[0].errors}`);
throw transactionsResponses[0].errors;
// Register to braodcaster
}
({ transactionsResponses }) => {
if (transactionsResponses[0].status === TransactionStatus.OK) {
return this.addVerifiedTransaction(transaction, cb);
}
if (transactionsResponses[0].status === TransactionStatus.PENDING) {
return this.addMultisignatureTransaction(transaction, cb);
}
this.logger.info(
`Transaction pool - ${transactionsResponses[0].errors}`
);
return cb(transactionsResponses[0].errors);
}
);