Skip to content

Commit

Permalink
Fix for wrong script func
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Nov 13, 2020
1 parent 1ce9291 commit d4bf4f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bitcoin
import (
"errors"

"github.com/libsv/go-bt"
"github.com/libsv/go-bt/bscript"
)

// ScriptFromAddress will create an output P2PKH script from an address string
Expand All @@ -14,11 +14,11 @@ func ScriptFromAddress(address string) (string, error) {
}

// Generate a script from address
rawScript, err := bt.NewP2PKHOutputFromAddress(address, 0)
rawScript, err := bscript.NewP2PKHFromAddress(address)
if err != nil {
return "", err
}

// Return the string version
return rawScript.GetLockingScriptHexString(), nil
return rawScript.ToString(), nil
}

0 comments on commit d4bf4f9

Please sign in to comment.