| 3359 | return super(htx, self).network_id_to_code(networkTitle, currencyCode) |
| 3360 | |
| 3361 | def network_code_to_id(self, networkCode: str, currencyCode: Str = None): |
| 3362 | if networkCode is None: |
| 3363 | return None |
| 3364 | if currencyCode is None: |
| 3365 | return super(htx, self).network_code_to_id(networkCode) |
| 3366 | keys = list(self.options['networkChainIdsByNames'].keys()) |
| 3367 | keysLength = len(keys) |
| 3368 | if keysLength == 0: |
| 3369 | raise ExchangeError(self.id + ' networkCodeToId() - markets need to be loaded at first') |
| 3370 | uniqueNetworkIds = self.safe_value(self.options['networkChainIdsByNames'], currencyCode, {}) |
| 3371 | if networkCode in uniqueNetworkIds: |
| 3372 | return uniqueNetworkIds[networkCode] |
| 3373 | else: |
| 3374 | networkTitle = super(htx, self).network_code_to_id(networkCode, currencyCode) |
| 3375 | return self.safe_value(uniqueNetworkIds, networkTitle, networkTitle) |
| 3376 | |
| 3377 | async def fetch_balance(self, params={}) -> Balances: |
| 3378 | """ |