@@ -46,7 +46,7 @@ export default function Bitcoin() {
46 const pubKey = need.urbitWallet(urbitWallet).bitcoin.keys.public;
46 const pubKey = need.urbitWallet(urbitWallet).bitcoin.keys.public;
47 const chain = need.urbitWallet(urbitWallet).bitcoin.keys.chain;
47 const chain = need.urbitWallet(urbitWallet).bitcoin.keys.chain;
49− const hd = bitcoin.bip32.fromPrivateKey(
49+ const btcWallet = bitcoin.bip32.fromPrivateKey(
50 Buffer.from(privKey, 'hex'),
50 Buffer.from(privKey, 'hex'),
51 Buffer.from(chain, 'hex'),
51 Buffer.from(chain, 'hex'),
52 bitcoin.networks.bitcoin
52 bitcoin.networks.bitcoin
@@ -63,7 +63,7 @@ export default function Bitcoin() {
65 const validate = composeValidator({
65 const validate = composeValidator({
66− unsignedTransaction: buildPsbtValidator(hd),
66+ unsignedTransaction: buildPsbtValidator(btcWallet),
69 const onValues = ({ valid, values, form }) => {
69 const onValues = ({ valid, values, form }) => {
@@ -73,7 +73,7 @@ export default function Bitcoin() {
73 .reduce((psbt, input, idx) => {
73 .reduce((psbt, input, idx) => {
74 // removing already derived part, eg m/84'/0'/0'/0/0 becomes 0/0
74 // removing already derived part, eg m/84'/0'/0'/0/0 becomes 0/0
75 const path = input.bip32Derivation[0].path.substring(12);
75 const path = input.bip32Derivation[0].path.substring(12);
76− const prv = hd.derivePath(path).privateKey;
76+ const prv = btcWallet.derivePath(path).privateKey;
78 return psbt.signInput(idx, bitcoin.ECPair.fromPrivateKey(prv));
78 return psbt.signInput(idx, bitcoin.ECPair.fromPrivateKey(prv));
79 } catch (e) {
79 } catch (e) {