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

fix: solana address validation #1184

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Conversation

leoslr
Copy link
Contributor

@leoslr leoslr commented Oct 2, 2023

Description of the changes

The validation was broken when trying to validate ERC20 currencies on Solana

@coveralls
Copy link

Coverage Status

coverage: 87.473%. remained the same when pulling 8c9c87e on fix/solana-address-validation into d6a6b06 on master.

@@ -246,7 +246,7 @@ export class CurrencyManager<TMeta = unknown> implements ICurrencyManager<TMeta>
case RequestLogicTypes.CURRENCY.ERC777:
if (NearChains.isChainSupported(currency.network)) {
return isValidNearAddress(address, currency.network);
} else if (currency.network === 'tron') {
} else if (currency.network === 'tron' || currency.network === 'solana') {
Copy link
Member

Choose a reason for hiding this comment

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

@leoslr Is it the fix or is the change of version of multicoin-address-validator also needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both are needed:

  • We need to tackle solana case here
  • The lib update was needed as well, version 5.2 didn't handle solana

@leoslr leoslr merged commit aff90df into master Oct 2, 2023
28 checks passed
@leoslr leoslr deleted the fix/solana-address-validation branch October 2, 2023 15:56
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.

None yet

5 participants