Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: rebus support #324

Open
4 tasks done
Clarxxon opened this issue Dec 28, 2022 · 0 comments
Open
4 tasks done

Bug report: rebus support #324

Clarxxon opened this issue Dec 28, 2022 · 0 comments

Comments

@Clarxxon
Copy link

Prerequisites

Expected Behavior

Hey! I'm trying to use cosmpy to work with rebus, but when I try to construct a transaction, I get an error with the account.

from cosmpy.aerial.wallet import LocalWallet
from cosmpy.crypto.keypairs import PrivateKey
import bip_utils.slip.slip44.slip44 
mnemonic = "1 2 3 4 5"

seed_bytes = Bip39SeedGenerator(mnemonic).Generate()
bip44_def_ctx = Bip44.FromSeed(seed_bytes, Bip44Coins.COSMOS).DeriveDefaultPath()

wallet = LocalWallet(PrivateKey(bip44_def_ctx.PrivateKey().Raw().ToBytes()), prefix=prefix)
address = wallet.address()

balance = ledger_client.query_bank_balance(address)

print(f"Sender Address: {address}, Balance: {balance/1000000000000000000}")
account = ledger_client.query_account(wallet.address())```

### Current Behavior

RuntimeError: Unexpected account type returned from query

### To Reproduce

_No response_

### Context

mac os m1

### Failure Logs

```262 account = BaseAccount()
    263 if not response.account.Is(BaseAccount.DESCRIPTOR):
--> 264     raise RuntimeError("Unexpected account type returned from query")
    265 response.account.Unpack(account)
    267 return Account(
    268     address=address,
    269     number=account.account_number,
    270     sequence=account.sequence,
    271 )

RuntimeError: Unexpected account type returned from query```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant