Skip to content

Suggestions to improve AccountProperties #134

@dgarcia360

Description

@dgarcia360

Feedback after using the feature AccountPropertyTransaction:

  1. AccountPropertyTransaction.createAddressFilter could be created with a different class (e.g. "FilterModification" or just "Filter"). The reason behind is to follow the same approach already implemented in MultisigCosignatoryModification when sending a multisig transaction.

Current approach

const filter = AccountPropertyTransaction
    .createAddressFilter(
        PropertyModificationType.Add,
        Address.createFromRawAddress('SC5DT5Y4DZ7ATYFSWSUX76FAWL6O4ZS2UZ5QSCWF')
    );

Proposed approach

const filter = new FilterModification(
    PropertyModificationType.Add, 
    Address.createFromRawAddress('SC5DT5Y4DZ7ATYFSWSUX76FAWL6O4ZS2UZ5QSCWF')
);

or

const filter = FilterModification.createForAddress(
    PropertyModificationType.Add, 
    Address.createFromRawAddress('SC5DT5Y4DZ7ATYFSWSUX76FAWL6O4ZS2UZ5QSCWF')
);
  1. createEntityTypeFilter(modificationType: PropertyModificationType, entityType: number) accepts a number as an entityType parameter. To reduce typing errors, it would be better to limit the parameter to the TransactionType enumeration.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions