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

feat: update to read from new document with chainId field #520

Closed
wants to merge 24 commits into from

Conversation

isaackps
Copy link
Contributor

Summary

Tech spike for auto validate documents

Changes

  • added a new field call 'chainId' into document fules as new document type
  • added validation to read the new field to determine which network it should use to validate the file

Issues

https://www.pivotaltracker.com/n/projects/2424361/stories/180613089

@isaackps isaackps added the wip label Jan 17, 2022
Base automatically changed from feat/multi-chain to master February 28, 2022 07:08
@osslgtm
Copy link
Contributor

osslgtm commented Feb 28, 2022

should we consider switching chainId to required ?

as we are using it by default, alongside the chain field in the schema

https://schema.openattestation.com/3.0/schema.json

image

try {
const json = JSON.parse(reader.result as string);
const chainId = getChainId(json);
if (chainId && currentChainId !== chainId) {
await changeNetwork(chainId);
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this conflicts with the flow for #550

Copy link
Contributor

Choose a reason for hiding this comment

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

image

@isaackps isaackps closed this Mar 9, 2022
@isaackps isaackps deleted the feat/auto-multi-chain branch March 23, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants