-
Notifications
You must be signed in to change notification settings - Fork 40
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
Conversation
src/testutils/contractController.ts
Outdated
@@ -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){ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old comment
src/testutils/contractController.ts
Outdated
@@ -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 { |
There was a problem hiding this comment.
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);
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/transaction.local.net.spec.ts
Outdated
}, | ||
}); | ||
{ timeoutMilliseconds: 100000 }, |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
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.