|
7 | 7 |
|
8 | 8 | import json |
9 | 9 | import logging |
10 | | -from urllib.parse import urljoin |
11 | | -import requests |
12 | 10 | import secrets |
13 | 11 | import time |
14 | 12 |
|
| 13 | +from urllib.parse import urljoin |
15 | 14 |
|
| 15 | +import requests |
16 | 16 | from eth_utils import remove_0x_prefix |
17 | 17 |
|
18 | 18 | from convex_api.exceptions import ( |
@@ -55,14 +55,10 @@ def send(self, transaction, account, language=None, sequence_retry_count=20): |
55 | 55 | if not isinstance(transaction, str): |
56 | 56 | raise TypeError('The transaction must be a type str') |
57 | 57 |
|
58 | | - # number of retries for a SEQUENCE error |
59 | | - counter = 0 |
60 | | - last_sequence_number = None |
61 | 58 | result = None |
62 | | - last_id = None |
63 | 59 | while sequence_retry_count >= 0: |
64 | 60 | try: |
65 | | - hash_data = self._transaction_prepare(account.address, transaction, last_sequence_number, language) |
| 61 | + hash_data = self._transaction_prepare(account.address, transaction, language=language) |
66 | 62 | signed_data = account.sign(hash_data['hash']) |
67 | 63 | result = self._transaction_submit(account.address, hash_data['hash'], signed_data) |
68 | 64 | except ConvexAPIError as error: |
@@ -247,7 +243,7 @@ def get_account_info(self, address_account): |
247 | 243 | logger.debug(f'get_account_info repsonse {result}') |
248 | 244 | return result |
249 | 245 |
|
250 | | - def _transaction_prepare(self, address, transaction, sequence_number=None, language=None): |
| 246 | + def _transaction_prepare(self, address, transaction, language=None, sequence_number=None): |
251 | 247 | """ |
252 | 248 |
|
253 | 249 | """ |
|
0 commit comments