Skip to content

Add initial SmartTransactionsController#1

Merged
wachunei merged 7 commits intomainfrom
feature/initial-controller
Sep 1, 2021
Merged

Add initial SmartTransactionsController#1
wachunei merged 7 commits intomainfrom
feature/initial-controller

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