forked from bitcoinafterlife/bal-electrum-plugin
download welist
This commit is contained in:
14
bal.py
14
bal.py
@@ -1,15 +1,10 @@
|
||||
import random
|
||||
import os
|
||||
from hashlib import sha256
|
||||
from typing import NamedTuple, Optional, Dict, Tuple
|
||||
|
||||
from electrum.plugin import BasePlugin
|
||||
from electrum.util import to_bytes, bfh
|
||||
from electrum import json_db
|
||||
from electrum.transaction import tx_from_any
|
||||
|
||||
from . import util as Util
|
||||
from . import willexecutors as Willexecutors
|
||||
import os
|
||||
json_db.register_dict('heirs', tuple, None)
|
||||
json_db.register_dict('will', lambda x: get_will(x), None)
|
||||
@@ -17,11 +12,10 @@ json_db.register_dict('will_settings', lambda x:x, None)
|
||||
from electrum.logging import get_logger
|
||||
def get_will(x):
|
||||
try:
|
||||
#print("______________________________________________________________________________________________________")
|
||||
#print(x)
|
||||
|
||||
|
||||
x['tx']=tx_from_any(x['tx'])
|
||||
except Exception as e:
|
||||
#Util.print_var(x)
|
||||
raise e
|
||||
|
||||
return x
|
||||
@@ -69,7 +63,7 @@ class BalPlugin(BasePlugin):
|
||||
HIDE_INVALIDATED:True,
|
||||
ALLOW_REPUSH: False,
|
||||
WILLEXECUTORS: {
|
||||
'http://bitcoin-after.life:9137': {
|
||||
'https://bitcoin-after.life:9137': {
|
||||
"base_fee": 100000,
|
||||
"status": "New",
|
||||
"info":"Bitcoin After Life Will Executor",
|
||||
@@ -102,10 +96,8 @@ class BalPlugin(BasePlugin):
|
||||
|
||||
def config_get(self,key):
|
||||
v = self.config.get(key,None)
|
||||
print("config get",key,v)
|
||||
if v is None:
|
||||
self.config.set_key(key,self.DEFAULT_SETTINGS[key])
|
||||
print("config setkey",key)
|
||||
v = self.DEFAULT_SETTINGS[key]
|
||||
return v
|
||||
|
||||
|
||||
Reference in New Issue
Block a user