Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhiyou1990 committed Oct 27, 2022
1 parent 209bb2f commit 4bc7dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/AptosSwift/AptosAddress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public struct AptosAddress: CustomStringConvertible {
}

public init(_ address: String) throws {
guard address.isHex() else {
guard address.hasPrefix("0x"), address.isHex() else {
throw AptosError.keyError("Invalid address string. \(address)")
}
let hex = address.stripHexPrefix()
Expand Down

0 comments on commit 4bc7dd6

Please sign in to comment.