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

Support for proper encoding of addresses (don't remove leading 0s from string) #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

slawomir-pryczek
Copy link

No description provided.

@sc0Vu sc0Vu self-requested a review September 13, 2023 09:25
Copy link
Member

@sc0Vu sc0Vu left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, I leave some comments. Let me know if you have other questions.

}
throw new InvalidArgumentException('The input type didn\'t support.');
}
protected function encodeInput($input, $type = false)
Copy link
Member

Choose a reason for hiding this comment

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

Should we submit another PR for this feature?

@@ -34,7 +34,15 @@ static function encode(string $input, string $encoding='utf8')
{
$output = '';
switch ($encoding) {
case 'hex':
// fixed length hex
case 'hex_fixed':
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch. How about use type instead of hex_fixed here?

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