Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
klimoza committed Jul 22, 2022
1 parent 088a690 commit 9cacc58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def get_collection(contract, net):
r = requests.post("https://rpc.testnet.near.org", json=pload)
else:
r = requests.post("https://rpc.mainnet.near.org", json=pload)
if "result" not in r.json() or "result" not in r.json()["result"]:
return contract
result = json.loads(bytearray(r.json()["result"]["result"]).decode("utf-8"))
return result["name"]

Expand Down

0 comments on commit 9cacc58

Please sign in to comment.