Skip to content

Is BitcoinAddress legacy wrong when HashType is .scriptHash ? #273

Description

@QiuDaniel

In BitcoinAddress+Legacy.swift
public var legacy: String {
switch hashType {
case .pubkeyHash:
return Base58Check.encode([network.pubkeyhash] + data)
case .scriptHash:
return Base58Check.encode([network.pubkeyhash] + data)
}
}

correct way:
case .scriptHash:
return Base58Check.encode([network.scripthash] + data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions