Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

Add ENS names resolving / lookup #712

Merged
merged 11 commits into from
May 12, 2018
Merged

Add ENS names resolving / lookup #712

merged 11 commits into from
May 12, 2018

Conversation

hewigovens
Copy link
Contributor

This is essential for #311

@hewigovens hewigovens requested a review from vikmeup May 9, 2018 11:15
@BlackDuckCoPilot
Copy link

BlackDuckCoPilot commented May 9, 2018

Black Duck Security Report

Merging #712 into master will not change security risk.

Added Components

Clean: 1

Removed Components

Clean: 1

Click here to see full report

guard data.count == 32 else {
return seal.reject(ENSError.decodeError)
}
let sub = Data(bytes: data.bytes[12...])
Copy link
Contributor

Choose a reason for hiding this comment

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

what does 12... does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

take last 20 (32 - 12 ) bytes for Address, maybe data.suffix(20) is better?

Copy link
Contributor

Choose a reason for hiding this comment

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

do you mind adding a comment that this is getting address, otherwise LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -11,17 +11,20 @@ struct AccountViewModel {
let current: Wallet?
let walletBalance: Balance?
let server: RPCServer
let ensName: String
Copy link
Contributor

Choose a reason for hiding this comment

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

can we pas ENS Model instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can change this later, a string is enough right now

@IBOutlet weak var balanceLable: UILabel!
@IBOutlet weak var addressLable: UILabel!
Copy link
Contributor

Choose a reason for hiding this comment

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

can you rename addressLabel ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
return "\(ensName) (\(wallet.address.description))"
return String(format: "%@ (%@...%@)", ensName, String(address.prefix(6)), String(address.suffix(6)))
Copy link
Contributor

Choose a reason for hiding this comment

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

do 4 or even 3, let's get this merged

@vikmeup vikmeup merged commit e7d367e into master May 12, 2018
@vikmeup vikmeup deleted the ens-client branch May 12, 2018 23:48
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.

3 participants