Skip to content

Commit a775f8f

Browse files
committed
dump version 2.0.2
1 parent 65cb88d commit a775f8f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
py_version = platform.python_version()
1414

15-
PACKAGE_VERSION = '1.0.10'
15+
PACKAGE_VERSION = '2.0.2'
1616
PACKAGE_REQUIRED = [
1717
'urllib3',
1818
'pycryptodome',

tronapi/tron.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,11 @@ def send_trx(self, **kwargs):
392392
kwargs.get('to_address'),
393393
kwargs.get('amount'))
394394

395-
def send_transaction(self, from_address, to_address, amount):
395+
def send_transaction(self, owner_address, to_address, amount):
396396
"""Send transaction to Blockchain
397397
398398
Args:
399-
from_address (str): From address
399+
owner_address (str): Owner address
400400
to_address (str): To address
401401
amount (float): Value
402402
@@ -411,7 +411,7 @@ def send_transaction(self, from_address, to_address, amount):
411411
if not self.is_address(to_address):
412412
raise InvalidTronError('Invalid address provided')
413413

414-
transaction = self._create_transaction(from_address, to_address, amount)
414+
transaction = self._create_transaction(owner_address, to_address, amount)
415415
sign = self._sign_transaction(transaction)
416416
response = self._send_raw_transaction(sign)
417417

@@ -420,12 +420,12 @@ def send_transaction(self, from_address, to_address, amount):
420420

421421
return result
422422

423-
def _create_transaction(self, from_address, to_address, amount):
423+
def _create_transaction(self, owner_address, to_address, amount):
424424
"""Creates a transaction of transfer.
425425
If the recipient address does not exist, a corresponding account will be created on the blockchain.
426426
427427
Args:
428-
from_address (str): from address
428+
owner_address (str): from address
429429
to_address (str): to address
430430
amount (float): amount
431431
@@ -438,7 +438,7 @@ def _create_transaction(self, from_address, to_address, amount):
438438
raise InvalidTronError('Invalid amount provided')
439439

440440
_to = self.to_hex(to_address)
441-
_from = self.to_hex(from_address)
441+
_from = self.to_hex(owner_address)
442442

443443
if _to == _from:
444444
raise TronError('Cannot transfer TRX to the same account')

0 commit comments

Comments
 (0)