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

460 Allow add EOA address in customised address book #558

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

jeden
Copy link
Collaborator

@jeden jeden commented Nov 21, 2024

@jeden jeden requested review from lmcmz and zhouxl November 21, 2024 23:24
@jeden jeden linked an issue Nov 21, 2024 that may be closed by this pull request
if !formatedAddress.hasPrefix("0x") {
formatedAddress = "0x" + formatedAddress
var formattedAddress = state.address.trim().lowercased()
if !formattedAddress.hasPrefix("0x") {
Copy link
Member

Choose a reason for hiding this comment

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

use addHexPrefix instead

class AddAddressViewModel: ViewModel {
final class AddAddressViewModel: ViewModel {
enum AddressType {
case flow, eoa
Copy link
Member

Choose a reason for hiding this comment

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

The type should be flow and evm

@@ -298,6 +313,20 @@ extension AddAddressView.AddAddressViewModel {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: task)
}

private func checkEoaAddressExists(_ address: String) {
guard let eoa = EthereumAddress(address, type: .normal, ignoreChecksum: false) else {
Copy link
Member

Choose a reason for hiding this comment

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

ignoreChecksum should be true.

 guard let eoa = EthereumAddress(address, ignoreChecksum: true) else {

@jeden jeden requested a review from lmcmz November 22, 2024 00:37
@jeden jeden merged commit 89440cc into develop Nov 22, 2024
1 check passed
@jeden jeden deleted the fts/460-allow-eoa-in-address-book branch November 22, 2024 02:40
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.

[FEATURE] Allow add EOA address in customised address book
2 participants