Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended localnet tests to use the transaction factories, as well #389

Merged
merged 15 commits into from
Apr 5, 2024

Conversation

popenta
Copy link
Contributor

@popenta popenta commented Feb 23, 2024

Duplicated the tests that run on localnet to use the transaction factories. The old tests will be removed in the future, when the functionality will be deleted.

@popenta popenta self-assigned this Feb 23, 2024
CiprianDraghici
CiprianDraghici previously approved these changes Mar 8, 2024
@andreibancioiu andreibancioiu self-requested a review March 25, 2024 13:24
andreibancioiu
andreibancioiu previously approved these changes Apr 5, 2024
@@ -55,4 +57,14 @@ export class ContractController {
Logger.debug(`ContractController.query [end]: function = ${interaction.getFunction()}, return code = ${bundle.returnCode}`);
return bundle;
}

private getTransactionHash(transaction: Transaction | TransactionNext): string {
if ("toSendable" in transaction){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have checked by getHash, but fine this way, as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old comment

@@ -55,4 +58,10 @@ export class ContractController {
Logger.debug(`ContractController.query [end]: function = ${interaction.getFunction()}, return code = ${bundle.returnCode}`);
return bundle;
}

private getTransactionHash(transaction: Transaction): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally speaking, hash should also have been returned by await this.provider.sendTransaction(transaction);.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

},
});
{ timeoutMilliseconds: 100000 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have added a utility test function such as createTransactionWatcher.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@andreibancioiu andreibancioiu changed the title Duplicated localnet tests to use the transaction factories Extended localnet tests to use the transaction factories, as well Apr 5, 2024
@popenta popenta merged commit 86c06a4 into feat/next Apr 5, 2024
1 check passed
@popenta popenta deleted the duplicate-local-tests branch April 5, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants