Skip to content

Commit

Permalink
refactor: devnet only milestone
Browse files Browse the repository at this point in the history
  • Loading branch information
spkjp committed May 4, 2019
1 parent c0569ca commit 9f63e91
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/core-transactions/src/handlers/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ export abstract class TransactionHandler implements ITransactionHandler {
wallet: State.IWallet,
databaseWalletManager: State.IWalletManager,
): boolean {
// NOTE: Checks if it can be applied based on sender wallet
// could be merged with `apply` so they are coupled together :thinking_face:

const { data }: Interfaces.ITransaction = transaction;

if (
Expand Down Expand Up @@ -66,9 +63,10 @@ export abstract class TransactionHandler implements ITransactionHandler {
throw new InvalidSecondSignatureError();
}
} else if (data.secondSignature || data.signSignature) {
// TODO: get rid of this milestone by adding exceptions, the milestone is solely
// necessary because of devnet.
if (!Managers.configManager.getMilestone().ignoreInvalidSecondSignatureField) {
const isException =
Managers.configManager.get("network.name") === "devnet" &&
Managers.configManager.getMilestone().ignoreInvalidSecondSignatureField;
if (!isException) {
throw new UnexpectedSecondSignatureError();
}
}
Expand Down

0 comments on commit 9f63e91

Please sign in to comment.