Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

feat: validate account #88

Merged
merged 6 commits into from
Jul 26, 2023
Merged

feat: validate account #88

merged 6 commits into from
Jul 26, 2023

Conversation

Rakowskiii
Copy link
Contributor

Description

Verifying account format against caip-2

Resolves #80

How Has This Been Tested?

Ran tests. Added unit tests for regex.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@Rakowskiii Rakowskiii linked an issue Jun 29, 2023 that may be closed by this pull request
src/state.rs Outdated
// account_id: chain_id + ":" + address
// address: any chain address
// Unwrap is ok as this is a static regex
let regex = regex::Regex::new(r"^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:.{1,100}$").unwrap();
Copy link
Member

@chris13524 chris13524 Jun 29, 2023

Choose a reason for hiding this comment

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

@Rakowskiii Rakowskiii requested review from chris13524, xav and a team July 24, 2023 12:29
@Rakowskiii Rakowskiii merged commit e8d441e into main Jul 26, 2023
5 checks passed
@Rakowskiii Rakowskiii deleted the 80-verify-account-format branch July 26, 2023 04:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify account format
2 participants