diff --git a/test/integration/p2sh.js b/test/integration/p2sh.js index 24df76e..dbc8fe8 100644 --- a/test/integration/p2sh.js +++ b/test/integration/p2sh.js @@ -24,15 +24,16 @@ describe('Bitcoin-js', function() { return ECKey.fromWIF(wif) }) - // how much to withdraw if we run dry var coldAmount = 2e4 var outputAmount = 1e4 var pubKeys = privKeys.map(function(eck) { return eck.pub }) var redeemScript = Script.createMultisigScriptPubKey(2, pubKeys) - var multisigAddress = new Address(redeemScript.getHash(), networks.testnet.scriptHash).toString() + var scriptPubKey = Script.createP2SHScriptPubKey(redeemScript.getHash()) - // Send some testnet coins to the multisig address to ensure it has some unspents for later + var multisigAddress = Address.fromScriptPubKey(scriptPubKey, networks.testnet).toString() + + // Attempt to send funds to the source address, providing some unspents for later helloblock.faucet.withdraw(multisigAddress, coldAmount, function(err) { if (err) return done(err) })