MetaMask / MetaMask/metamask-mobile

[FIX]: Fix tests so that a chainId is always returned

Open
#8,367 0 comments 0 reactions 1 assignee Claimed by @segun View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

After this PR [[#8282](https://github.com/MetaMask/metamask-mobile/pull/8282)], we will need to update test cases so that a chainId is always returned. Right now we are fixing this with this code

```
if (chainId === undefined) {
return true;
}
```

ideally, we should remove the condition and always return a chan id from tests

### Scenario

MA

### Design

NA

### Technical Details

We need to remove the below condition from [app/util/blockaid/index.ts](https://github.com/MetaMask/metamask-mobile/pull/8282/files/e36284bd76f36bc558a93601fd42713919a8d296#diff-60215962f51ce4f0796c7295ac2bc618c19c14bc8fef9278c8dfc54a7f382c7d) and make sure test cases pass by always returning chain id from affected test cases.

### Threat Modeling Framework

NA

### Acceptance Criteria

NA

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

NA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.