mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 02:28:10 +01:00
fix: testnet is in the bip32 derivation path
This commit is contained in:
parent
2ac8ee95b0
commit
f202d80241
@ -4,10 +4,9 @@ async function serialSigner(path) {
|
||||
name: 'serial-signer',
|
||||
template: t,
|
||||
|
||||
props: ['sats-denominated'],
|
||||
props: ['sats-denominated', 'network'],
|
||||
data: function () {
|
||||
return {
|
||||
network: 'Mainnet', // todo: hardcoded for now
|
||||
selectedPort: null,
|
||||
writableStreamClosed: null,
|
||||
writer: null,
|
||||
@ -463,6 +462,7 @@ async function serialSigner(path) {
|
||||
},
|
||||
hwwXpub: async function (path) {
|
||||
try {
|
||||
console.log('### hwwXpub', COMMAND_XPUB + ' ' + this.network + ' ' + path)
|
||||
await this.writer.write(
|
||||
COMMAND_XPUB + ' ' + this.network + ' ' + path + '\n'
|
||||
)
|
||||
|
@ -32,22 +32,26 @@ async function walletList(path) {
|
||||
{
|
||||
label: 'Pay-to-pubkey-hash scripts (P2PKH)',
|
||||
value: 'pkh',
|
||||
path: "m/44'/0'/0'"
|
||||
pathMainnet: "m/44'/0'/0'",
|
||||
pathTestnet: "m/44'/1'/0'"
|
||||
},
|
||||
{
|
||||
label: 'Pay-to-witness-pubkey-hash scripts (P2WPKH)',
|
||||
value: 'wpkh',
|
||||
path: "m/84'/0'/0'"
|
||||
pathMainnet: "m/84'/0'/0'",
|
||||
pathTestnet: "m/84'/1'/0'",
|
||||
},
|
||||
{
|
||||
label: 'Pay-to-script-hash scripts (P2SH-P2WPKH)',
|
||||
value: 'sh',
|
||||
path: "m/49'/0'/0'"
|
||||
pathMainnet: "m/49'/0'/0'",
|
||||
pathTestnet: "m/49'/1'/0'"
|
||||
},
|
||||
{
|
||||
label: 'Pay-to-taproot outputs (P2TR)',
|
||||
value: 'tr',
|
||||
path: "m/86'/0'/0'"
|
||||
pathMainnet: "m/86'/0'/0'",
|
||||
pathTestnet: "m/86'/1'/0'"
|
||||
}
|
||||
],
|
||||
|
||||
@ -265,7 +269,7 @@ async function walletList(path) {
|
||||
handleAddressTypeChanged: function (value) {
|
||||
const addressType =
|
||||
this.addressTypeOptions.find(t => t.value === value) || {}
|
||||
this.accountPath = addressType.path
|
||||
this.accountPath = addressType[`path${this.network}`]
|
||||
}
|
||||
},
|
||||
created: async function () {
|
||||
|
@ -10,6 +10,7 @@
|
||||
<template v-slot:serial>
|
||||
<serial-signer
|
||||
ref="serialSigner"
|
||||
:network="config.network"
|
||||
:sats-denominated="config.sats_denominated"
|
||||
@signed:psbt="updateSignedPsbt"
|
||||
></serial-signer>
|
||||
|
Loading…
Reference in New Issue
Block a user