Skip to content

[FIX] Empty address handling #844

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

Merged
merged 1 commit into from
Dec 9, 2020
Merged

Conversation

mmrozek
Copy link
Contributor

@mmrozek mmrozek commented Dec 8, 2020

Description

Empty string should not be validated as the correct address

@mmrozek mmrozek requested a review from kapke December 8, 2020 15:40
@@ -94,15 +94,15 @@ trait JsonMethodsImplicits {

for {
from <- input.get("from") match {
case Some(JString(s)) => extractAddress(s)
case Some(JString(s)) if s.nonEmpty => extractAddress(s)
case Some(JString(_)) => extractAddress("0x0")
Copy link
Contributor

Choose a reason for hiding this comment

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

that line is invalid I think, no one should be able to send tx from "0x0" address

Copy link
Contributor

@kapke kapke left a comment

Choose a reason for hiding this comment

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

One minor thing and LGTM!

@mmrozek mmrozek force-pushed the fix/empty-address-handling branch from 6f74777 to 72841fd Compare December 8, 2020 15:54
@biandratti
Copy link
Contributor

LGTM!

@mmrozek mmrozek merged commit 75a5a71 into develop Dec 9, 2020
@mmrozek mmrozek deleted the fix/empty-address-handling branch December 9, 2020 11:48
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.

3 participants