Skip to content

Commit

Permalink
fix: use strict comparison to decide if a transaction should be enabl…
Browse files Browse the repository at this point in the history
…ed (#3087)
  • Loading branch information
faustbrian authored and spkjp committed Oct 20, 2019
1 parent e928df7 commit 13808e0
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class BridgechainRegistrationTransactionHandler extends Handlers.Transact
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async bootstrap(connection: Database.IConnection, walletManager: State.IWalletManager): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class BridgechainResignationTransactionHandler extends Handlers.Transacti
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async bootstrap(connection: Database.IConnection, walletManager: State.IWalletManager): Promise<void> {
Expand Down Expand Up @@ -140,11 +140,11 @@ export class BridgechainResignationTransactionHandler extends Handlers.Transacti
transaction: Interfaces.ITransaction,
walletManager: State.IWalletManager,
// tslint:disable-next-line: no-empty
): Promise<void> { }
): Promise<void> {}

public async revertForRecipient(
transaction: Interfaces.ITransaction,
walletManager: State.IWalletManager,
// tslint:disable-next-line:no-empty
): Promise<void> { }
): Promise<void> {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class BridgechainUpdateTransactionHandler extends Handlers.TransactionHan
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async bootstrap(connection: Database.IConnection, walletManager: State.IWalletManager): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class BusinessRegistrationTransactionHandler extends Handlers.Transaction
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async bootstrap(connection: Database.IConnection, walletManager: State.IWalletManager): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class BusinessResignationTransactionHandler extends Handlers.TransactionH
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async bootstrap(connection: Database.IConnection, walletManager: State.IWalletManager): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class BusinessUpdateTransactionHandler extends Handlers.TransactionHandle
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async bootstrap(connection: Database.IConnection, walletManager: State.IWalletManager): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class DelegateResignationTransactionHandler extends TransactionHandler {
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async throwIfCannotBeApplied(
Expand Down
2 changes: 1 addition & 1 deletion packages/core-transactions/src/handlers/htlc-claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class HtlcClaimTransactionHandler extends TransactionHandler {
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public dynamicFee(
Expand Down
2 changes: 1 addition & 1 deletion packages/core-transactions/src/handlers/htlc-lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class HtlcLockTransactionHandler extends TransactionHandler {
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async throwIfCannotBeApplied(
Expand Down
2 changes: 1 addition & 1 deletion packages/core-transactions/src/handlers/htlc-refund.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class HtlcRefundTransactionHandler extends TransactionHandler {
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public dynamicFee(
Expand Down
2 changes: 1 addition & 1 deletion packages/core-transactions/src/handlers/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class IpfsTransactionHandler extends TransactionHandler {
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async throwIfCannotBeApplied(
Expand Down
2 changes: 1 addition & 1 deletion packages/core-transactions/src/handlers/multi-payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class MultiPaymentTransactionHandler extends TransactionHandler {
}

public async isActivated(): Promise<boolean> {
return !!Managers.configManager.getMilestone().aip11;
return Managers.configManager.getMilestone().aip11 === true;
}

public async throwIfCannotBeApplied(
Expand Down

0 comments on commit 13808e0

Please sign in to comment.