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

KeyError: 'address' when submitting invalid mnemonic/address #2

Open
SecretShell opened this issue Jan 29, 2022 · 0 comments
Open

KeyError: 'address' when submitting invalid mnemonic/address #2

SecretShell opened this issue Jan 29, 2022 · 0 comments

Comments

@SecretShell
Copy link
Contributor

  • secret_sdk version: master
  • Python version: 3.10.1
  • Operating System: Arch Linux

Description

Tell us what happened:

I inputted a invalid mnemonic

What went wrong:

The SDK threw an error saying:
KeyError: 'address'

What you expected to happen:

To run a successful create_and_sign_tx function

What I Did

        mk = MnemonicKey(
            mnemonic="INVALID_WORD there flame scrub bulb utility inside jealous decide advice dance fitness shaft odor cloud release leg van away syrup romance february depend dance"
        )
        secret = AsyncLCDClient("http://localhost:1337/", "enigma-pub-testnet-3")
        wallet = secret.wallet(mk)
        send_msg = MsgSend(
            wallet.key.acc_address,
            wallet.key.acc_address,
            "1000000uscrt",  # send 1 scrt
        )
        tx = await wallet.create_and_sign_tx(
            msgs=[send_msg],
            memo="My first transaction!",
            fee=StdFee(200000, "120000uscrt"),
        )

This is the line that throws the error


There's no properties in the "value" property when an invalid address is submitted to
result = await self._c._get(f"/auth/accounts/{address}")

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