Skip to content

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

Open
@QiuDaniel

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions