mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
multisig fix
This commit is contained in:
parent
c13fda71f0
commit
6a1a656167
2 changed files with 12 additions and 2 deletions
|
|
@ -45,8 +45,9 @@ def combine():
|
|||
psbt1 = d['psbt1'] # request.args.get('psbt1')
|
||||
psbt = specter.combine([psbt0, psbt1])
|
||||
raw = specter.finalize(psbt)
|
||||
specter.broadcast(raw["hex"])
|
||||
return 'psbt0: %s<br><br>psbt1: %s<br><br>final: %s<br><br>raw: %s' % (psbt0, psbt1, psbt, raw["hex"])
|
||||
if "hex" in raw:
|
||||
specter.broadcast(raw["hex"])
|
||||
return json.dumps(raw)
|
||||
return 'meh'
|
||||
|
||||
@app.route('/')
|
||||
|
|
|
|||
|
|
@ -439,6 +439,7 @@ class WalletManager:
|
|||
"address_index": 0,
|
||||
"keypool": WALLET_CHUNK,
|
||||
"address": None,
|
||||
"change_index": 0,
|
||||
"change_address": None,
|
||||
"change_keypool": WALLET_CHUNK,
|
||||
}
|
||||
|
|
@ -465,7 +466,9 @@ class WalletManager:
|
|||
r = self.cli.importmulti(args, {"rescan": False}, wallet=self.cli_path+al, timeout=120)
|
||||
print(args)
|
||||
addr = self.cli.deriveaddresses(recv_desc, [0, 1])[0]
|
||||
change_addr = self.cli.deriveaddresses(change_desc, [0, 1])[0]
|
||||
o["address"] = addr
|
||||
o["change_address"] = change_addr
|
||||
if self.working_folder is not None:
|
||||
with open(os.path.join(self.working_folder, "%s.json" % al), "w+") as f:
|
||||
f.write(json.dumps(o, indent=4))
|
||||
|
|
@ -519,6 +522,12 @@ class Wallet(dict):
|
|||
self._dict["change_address"] = self.cli.deriveaddresses(self._dict["change_descriptor"], [index, index+1])[0]
|
||||
if index == self._dict["change_keypool"]-1:
|
||||
self._dict["change_keypool"] = self.keypoolrefill(self._dict["change_keypool"])
|
||||
else:
|
||||
if "change_index" not in self._dict:
|
||||
self._dict["change_index"] = 0
|
||||
index = self._dict["change_index"]
|
||||
self._dict["change_address"] = self.cli.deriveaddresses(self._dict["change_descriptor"], [index, index+1])[0]
|
||||
self._commit()
|
||||
|
||||
def getdata(self):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue