mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
ui: Improve rpc page usability for Decred.
This commit is contained in:
@@ -564,7 +564,7 @@ class DCRInterface(Secp256k1Interface):
|
||||
def withdrawCoin(self, value: float, addr_to: str, subfee: bool = False) -> str:
|
||||
if subfee:
|
||||
raise ValueError('TODO')
|
||||
params = [addr_to, value]
|
||||
params = [addr_to, float(value)]
|
||||
return self.rpc_wallet('sendtoaddress', params)
|
||||
|
||||
def isAddressMine(self, address: str, or_watch_only: bool = False) -> bool:
|
||||
|
||||
@@ -49,6 +49,9 @@ class FIROInterface(BTCInterface):
|
||||
# load with -hdseed= parameter
|
||||
pass
|
||||
|
||||
def checkWallets(self) -> int:
|
||||
return 1
|
||||
|
||||
def getNewAddress(self, use_segwit, label='swap_receive'):
|
||||
return self.rpc('getnewaddress', [label])
|
||||
# addr_plain = self.rpc('getnewaddress', [label])
|
||||
|
||||
@@ -84,6 +84,9 @@ class NAVInterface(BTCInterface):
|
||||
# Load with -importmnemonic= parameter
|
||||
pass
|
||||
|
||||
def checkWallets(self) -> int:
|
||||
return 1
|
||||
|
||||
def getWalletSeedID(self):
|
||||
return self.rpc('getwalletinfo')['hdmasterkeyid']
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ class PIVXInterface(BTCInterface):
|
||||
# No multiwallet support
|
||||
self.rpc_wallet = make_rpc_func(self._rpcport, self._rpcauth, host=self._rpc_host)
|
||||
|
||||
def checkWallets(self) -> int:
|
||||
return 1
|
||||
|
||||
def signTxWithWallet(self, tx):
|
||||
rv = self.rpc('signrawtransaction', [tx.hex()])
|
||||
return bytes.fromhex(rv['hex'])
|
||||
|
||||
Reference in New Issue
Block a user