Skip to content

Commit

Permalink
use flake8 format code
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code committed Oct 10, 2023
1 parent a55ed81 commit 6d3d632
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions fxsdk/client/grpc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
from fxsdk.x.cosmos.auth.v1beta1.query_pb2 import QueryAccountRequest, Bech32PrefixRequest, QueryModuleAccountsRequest
from fxsdk.x.cosmos.auth.v1beta1.query_pb2_grpc import QueryStub as AuthQuery
from fxsdk.x.cosmos.bank.v1beta1.bank_pb2 import Supply
from fxsdk.x.cosmos.bank.v1beta1.tx_pb2 import MsgSend
from fxsdk.x.cosmos.bank.v1beta1.query_pb2 import QueryBalanceRequest, QueryAllBalancesRequest, QueryTotalSupplyRequest, \
QuerySupplyOfRequest
from fxsdk.x.cosmos.bank.v1beta1.query_pb2 import (QueryBalanceRequest, QueryAllBalancesRequest,
QueryTotalSupplyRequest, QuerySupplyOfRequest)
from fxsdk.x.cosmos.bank.v1beta1.query_pb2_grpc import QueryStub as BankQuery
from fxsdk.x.cosmos.base.abci.v1beta1.abci_pb2 import GasInfo, TxResponse
from fxsdk.x.cosmos.base.tendermint.v1beta1.query_pb2 import GetBlockByHeightRequest, GetLatestBlockRequest, \
Expand Down Expand Up @@ -186,6 +185,6 @@ def wait_mint_tx(self, tx_hash: str) -> TxResponse:
try:
response = self.query_tx(tx_hash)
return response.tx_response
except:
except grpc.RpcError:
continue
raise Exception("not found tx")
4 changes: 2 additions & 2 deletions fxsdk/wallet/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
class Address:
def __init__(self, addr, prefix: str = DEFAULT_BECH32_PREFIX):
self._prefix = prefix
if type(addr) == str:
if type(addr) is str:
_, data = bech32.bech32_decode(addr)
self._data = data
elif type(addr) == bytes:
elif type(addr) is bytes:
self._data = bech32.convertbits(addr, 8, 5)
else:
raise Exception('invalid address')
Expand Down

0 comments on commit 6d3d632

Please sign in to comment.