Skip to content

Commit

Permalink
Revert "fix: fix #306"
Browse files Browse the repository at this point in the history
This reverts commit 3b38b99.
  • Loading branch information
xeroc committed May 13, 2022
1 parent 2065105 commit 16b6dfb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bitsharesbase/operationids.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@
"liquidity_pool_withdraw",
"liquidity_pool_exchange",
]
operations = [x for x, _ in enumerate(ops)]
operations = {o: ops.index(o) for o in ops}


def getOperationNameForId(i: int):
def getOperationNameForId(i):
"""Convert an operation id into the corresponding string."""
if i < len(ops):
return ops[i]
return f"Unknown Operation ID {i}"
for key in operations:
if int(operations[key]) is int(i):
return key
return "Unknown Operation ID %d" % i


def getOperationName(id: str):
Expand Down

0 comments on commit 16b6dfb

Please sign in to comment.