FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use bitwise-or instead of addition for combining asset_permissions. by jhtitor · Pull Request #75 · bitshares/python-bitshares · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 5 additions & 5 deletions bitshares/transactionbuilder.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(
else:
self._require_reconstruction = True
self.set_expiration(expiration)
self.fee_assert_id = "1.3.0"
self.fee_asset_id = "1.3.0"

def set_expiration(self, p):
self.expiration = p
Expand Down Expand Up @@ -269,7 +269,7 @@ def appendWif(self, wif):
def set_fee_asset(self, fee_asset):
""" Set asset to fee
"""
self.fee_assert_id = fee_asset.identifier
self.fee_asset_id = fee_asset.identifier

def constructTx(self):
""" Construct the actual transaction and store it in the class's dict
Expand All @@ -287,9 +287,9 @@ def constructTx(self):
# otherwise, we simply wrap ops into Operations
ops.extend([Operation(op)])

# We no wrap everything into an actual transaction
# We now wrap everything into an actual transaction
ops = transactions.addRequiredFees(self.bitshares.rpc, ops,
asset_id=self.fee_assert_id)
asset_id=self.fee_asset_id)
expiration = transactions.formatTimeFromNow(
self.expiration or self.bitshares.expiration
)
Expand All @@ -305,7 +305,7 @@ def constructTx(self):
self._unset_require_reconstruction()

def sign(self):
""" Sign a provided transaction witht he provided key(s)
""" Sign a provided transaction with the provided key(s)

:param dict tx: The transaction to be signed and returned
:param string wifs: One or many wif keys to use for signing
Expand Down
2 changes: 1 addition & 1 deletion bitsharesbase/asset_permissions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def toint(permissions):
permissions_int = 0
for p in permissions:
if permissions[p]:
permissions_int += asset_permissions[p]
permissions_int |= asset_permissions[p]
return permissions_int


Expand Down

Back | FazBrowse Home | New Git URL