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(evm): validate optional chain #453

Merged
merged 3 commits into from
Jul 5, 2022

Conversation

sogunshola
Copy link
Contributor

When calling transferNative, and any other Evm functionalities, we can
let the user provide a chain (EvmChainish). When they do, we check if
the provided chain corresponds the current chain. If that is not the
case we throw an error.


name: 'Pull request'
about: A new pull request

New Pull Request

Checklist

  • I am not disclosing a vulnerability.
  • My code is conform the code style
  • I have made corresponding changes to the documentation
  • I have updated Typescript definitions when needed

Issue Description

Related issue: #FILL_THIS_OUT

Solution Description

When calling transferNative, and any other Evm functionalities, we can
let the user provide a chain (EvmChainish). When they do, we check if
the provided chain corresponds the current chain. If that is not the
case we throw an error.
@changeset-bot
Copy link

changeset-bot bot commented Jun 14, 2022

🦋 Changeset detected

Latest commit: 30a406a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@moralisweb3/core Minor
@moralisweb3/evm Minor
@morlaisweb3/test-app-all Minor
@moralisweb3/evm-api Minor
@moralisweb3/server Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

packages/evm/src/utils/validators.ts Outdated Show resolved Hide resolved
packages/evm/src/utils/validators.ts Outdated Show resolved Hide resolved
packages/evm/src/chainMethods/transferNative.ts Outdated Show resolved Hide resolved
better function naming and more readable code
@sogunshola sogunshola requested a review from ErnoW June 30, 2022 09:46
ErnoW
ErnoW previously approved these changes Jul 5, 2022
@ErnoW ErnoW merged commit ba6fd72 into alpha Jul 5, 2022
@ErnoW ErnoW deleted the feature/sdkv2-optional-chain-validation branch July 5, 2022 12:15
@github-actions github-actions bot mentioned this pull request Jul 5, 2022
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