@@ -880,8 +880,8 @@ async def sweep(self, privkey, destination, fee=None, feerate=None, nocheck=Fals
880880
881881 arg:str:privkey:Private key. Type \' ?\' to get a prompt.
882882 arg:str:destination:Bitcoin address, contact or alias
883- arg:str :fee:Transaction fee (absolute, in BTC)
884- arg:str :feerate:Transaction fee rate (in sat/vbyte)
883+ arg:decimal :fee:Transaction fee (absolute, in BTC)
884+ arg:decimal :feerate:Transaction fee rate (in sat/vbyte)
885885 arg:int:imax:Maximum number of inputs
886886 arg:bool:nocheck:Do not verify aliases
887887 """
@@ -925,15 +925,15 @@ async def verifymessage(self, address, signature, message):
925925 message = util .to_bytes (message )
926926 return bitcoin .verify_usermessage_with_address (address , sig , message )
927927
928- def _get_fee_policy (self , fee , feerate ):
928+ def _get_fee_policy (self , fee : str , feerate : str ):
929929 if fee is not None and feerate is not None :
930930 raise Exception ('Cannot set both fee and feerate' )
931931 if fee is not None :
932932 fee_sats = satoshis (fee )
933933 fee_policy = FeePolicy (f'fixed:{ fee_sats } ' )
934934 elif feerate is not None :
935- feerate_per_byte = 1000 * feerate
936- fee_policy = FeePolicy (f'feerate:{ feerate_per_byte } ' )
935+ sat_per_kvbyte = int ( 1000 * to_decimal ( feerate ))
936+ fee_policy = FeePolicy (f'feerate:{ sat_per_kvbyte } ' )
937937 else :
938938 fee_policy = FeePolicy (self .config .FEE_POLICY )
939939 return fee_policy
@@ -946,7 +946,7 @@ async def payto(self, destination, amount, fee=None, feerate=None, from_addr=Non
946946 arg:str:destination:Bitcoin address, contact or alias
947947 arg:decimal_or_max:amount:Amount to be sent (in BTC). Type '!' to send the maximum available.
948948 arg:decimal:fee:Transaction fee (absolute, in BTC)
949- arg:float :feerate:Transaction fee rate (in sat/vbyte)
949+ arg:decimal :feerate:Transaction fee rate (in sat/vbyte)
950950 arg:str:from_addr:Source address (must be a wallet address; use sweep to spend from non-wallet address)
951951 arg:str:change_addr:Change address. Default is a spare address, or the source address if it's not in the wallet
952952 arg:bool:rbf:Whether to signal opt-in Replace-By-Fee in the transaction (true/false)
@@ -979,8 +979,8 @@ async def paytomany(self, outputs, fee=None, feerate=None, from_addr=None, from_
979979
980980 arg:json:outputs:json list of ["address", "amount in BTC"]
981981 arg:bool:rbf:Whether to signal opt-in Replace-By-Fee in the transaction (true/false)
982- arg:str :fee:Transaction fee (absolute, in BTC)
983- arg:str :feerate:Transaction fee rate (in sat/vbyte)
982+ arg:decimal :fee:Transaction fee (absolute, in BTC)
983+ arg:decimal :feerate:Transaction fee rate (in sat/vbyte)
984984 arg:str:from_addr:Source address (must be a wallet address; use sweep to spend from non-wallet address)
985985 arg:str:change_addr:Change address. Default is a spare address, or the source address if it's not in the wallet
986986 arg:bool:addtransaction:Whether transaction is to be used for broadcasting afterwards. Adds transaction to the wallet
0 commit comments