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

Add initial SmartTransactionsController #1

Merged
merged 7 commits into from
Sep 1, 2021

Conversation

wachunei
Copy link
Member

No description provided.

@wachunei wachunei marked this pull request as ready for review August 30, 2021 23:06
Copy link
Collaborator

@dan437 dan437 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

expect(pollSpy).toHaveBeenCalledTimes(1);
expect(updateSmartTransactionsSpy).toHaveBeenCalledTimes(1);
await smartTransactionsController.stop();
jest.useFakeTimers();
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

});

describe('setOptInState', () => {
it('should set optIn state', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a little thing, but I like to avoid the word should in test titles, since it sounds a bit unsure. In this case I would use something like: it('sets optIn state', () => {

if (!allowedNetworks.includes(chainId)) {
return;
}
await util.safelyExecute(() => this.updateSmartTransactions());
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does the safelyExecute fn do?

Copy link
Member Author

Choose a reason for hiding this comment

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

@wachunei wachunei merged commit ab8dd85 into main Sep 1, 2021
@wachunei wachunei deleted the feature/initial-controller branch September 1, 2021 18:34
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.

2 participants