shadowPaySDK 0.2.0.13__py3-none-any.whl → 0.2.0.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,13 @@ class Cheque:
21
21
  self.__allow__()
22
22
 
23
23
  def __get__id(self, tx):
24
+ if isinstance(tx, str):
25
+ try:
26
+ tx = self.w3.eth.get_transaction_receipt(tx)
27
+ except Exception as e:
28
+ print(f"Failed to get transaction receipt: {str(e)}")
29
+ return False
30
+
24
31
  try:
25
32
  logs = self.contract.events.ChequeCreated().process_receipt(tx)
26
33
  cheque_id = logs[0]["args"]["id"]
@@ -67,12 +74,15 @@ class Cheque:
67
74
  async def InitCheque(self, amount, receiver:list, private_key:Optional[str] = None):
68
75
  if not isinstance(receiver,list):
69
76
  raise ValueError("Receiver must be a list of addresses, [""0x1234...5678", "0x2345...6789""]")
70
- if private_key:
71
- address = self.w3.eth.account.from_key(private_key).address
72
- elif self.private_key:
73
- address = self.w3.eth.account.from_key(self.private_key).address
77
+
78
+ key = private_key or self.private_key
79
+
80
+ if key:
81
+ address = Web3.to_checksum_address(self.w3.eth.account.from_key(key).address)
82
+ print("InitCheque", amount, receiver, key)
83
+
74
84
  elif self.address:
75
- address = self.address
85
+ address = Web3.to_checksum_address(self.address)
76
86
  else:
77
87
  raise ValueError("No private key or address provided")
78
88
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shadowPaySDK
3
- Version: 0.2.0.13
3
+ Version: 0.2.0.15
4
4
  Summary: ShadowPay SDK for ERC20/ERC721 and P2P smart contract interaction
5
5
  Author: dazarius_
6
6
  Author-email: your@email.com
@@ -5,13 +5,13 @@ shadowPaySDK/interface/__init__.py,sha256=ggSZCV22udnzXm_Wv_3x6VN3hNIAEiwgwHZc2J
5
5
  shadowPaySDK/interface/erc20.py,sha256=TIsek7ykuYsLMj5no-uastA5gYsIbk-F_Dq-5XPk_6w,4298
6
6
  shadowPaySDK/interface/erc721.py,sha256=4AlWfDjrvl85wFocnN93j-oM54kTsLLwv9SdtcLj4eM,3094
7
7
  shadowPaySDK/interface/sol.py,sha256=flMfmW14J4ybfVshUUTw6iklKa5x-zJzjxRi011XKXA,7230
8
- shadowPaySDK/types/EVMcheque.py,sha256=HV3O1ycFppFHGswgORqQnrSPCfjDERDgdQ0bR-G4jTw,14164
8
+ shadowPaySDK/types/EVMcheque.py,sha256=aomYsyQdvLMGEc3VHppVaBABQR55lQYUc0OoHgW81OE,14449
9
9
  shadowPaySDK/types/SOLcheque.py,sha256=S6LnKxiWDj1KGRgFFAaHy03c7mxv4msaR-2cfVIhD2Y,818
10
10
  shadowPaySDK/types/__init__.py,sha256=sG6pNZfKGvENXqsnv6MrQtKrJ898fAXkMvAZY1k1-Qg,97
11
11
  shadowPaySDK/utils/__init__.py,sha256=aja3iYO4rT-ptMM-pzw0GRFTziBdXdcEi-4kE84zH64,61
12
12
  shadowPaySDK/utils/utils.py,sha256=g4bGvLDdjhNGsAj1eaZnNWFNaiN-cVhhM-5PrnG5aIQ,720
13
- shadowpaysdk-0.2.0.13.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
14
- shadowpaysdk-0.2.0.13.dist-info/METADATA,sha256=O72o3nM6gk91kcVvp8rKuMMnhyLfJbrmuGsK8EIpeoQ,840
15
- shadowpaysdk-0.2.0.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- shadowpaysdk-0.2.0.13.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
17
- shadowpaysdk-0.2.0.13.dist-info/RECORD,,
13
+ shadowpaysdk-0.2.0.15.dist-info/licenses/LICENSE,sha256=EG13vNmyBfkG3oKj40oOYfUGLKko8OouU6PfO6MlAk4,1066
14
+ shadowpaysdk-0.2.0.15.dist-info/METADATA,sha256=O8G4xf_Is40RtuCVI2BmU-0uJCHaZzadKuPS14SlrmQ,840
15
+ shadowpaysdk-0.2.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ shadowpaysdk-0.2.0.15.dist-info/top_level.txt,sha256=RSJc73GEf31NMdZp9KovEduzfhm10eQ2t5GTZ44aN1U,13
17
+ shadowpaysdk-0.2.0.15.dist-info/RECORD,,