Skip to content

Commit

Permalink
refactor: use contract loader first
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Jul 13, 2023
1 parent ef1f46f commit 8326ce4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apepay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ def normalize_address(cls, value: Any) -> AddressType:

@property
def contract(self) -> ContractInstance:
# TODO: Fix this
return self.project_manager.StreamManager.at(self.address)
# return self.chain_manager.contracts.instance_at(self.address)
try:
return self.chain_manager.contracts.instance_at(self.address)
except Exception:
return self.project_manager.StreamManager.at(self.address)

def __repr__(self) -> str:
return f"<apepay_sdk.StreamManager address={self.address}>"
Expand Down

0 comments on commit 8326ce4

Please sign in to comment.