We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello everyone!
SDK Version 4.1.1
I tried to claim a balance for the native asset on the Demo wallet.
First I ran the following script:
import time from stellar_sdk.exceptions import NotFoundError, BadRequestError, BadResponseError from stellar_sdk import ( Keypair, Network, Server, TransactionBuilder, Asset, Claimant, ClaimPredicate, CreateClaimableBalance, ) server = Server("https://horizon-testnet.stellar.org") sender = Keypair.from_secret("SDZX46FKI6PRND3X6NP4U7W3P4U4GMOXLRXK6SVO2TPYH2K2AICCMDYK") receiver = Keypair.from_public_key( "GAFMXOTSXIDUK64WAOJLWKRA7ELTC53COAQ2GOS3GQY2GV27JC3R7KQP" ) # NOTE: Proper error checks are omitted for brevity; always validate things! try: aAccount = server.load_account(sender.public_key) except NotFoundError: raise Exception(f"Failed to load {sender.public_key}") # Create a claimable balance with our two above-described conditions. soon = int(time.time() + 60) bCanClaim = ClaimPredicate.predicate_before_relative_time(60) aCanClaim = ClaimPredicate.predicate_not( ClaimPredicate.predicate_before_absolute_time(soon) ) # Create the operation and submit it in a transaction. claimableBalanceEntry = CreateClaimableBalance( asset=Asset.native(), amount="100", claimants=[ Claimant(destination=receiver.public_key, predicate=bCanClaim), Claimant(destination=sender.public_key, predicate=aCanClaim), ], ) tx = ( TransactionBuilder( source_account=aAccount, network_passphrase=Network.TESTNET_NETWORK_PASSPHRASE, base_fee=server.fetch_base_fee(), ) .append_operation(claimableBalanceEntry) .set_timeout(180) .build() ) tx.sign(sender) try: txResponse = server.submit_transaction(tx) print("Claimable balance created!") except (BadRequestError, BadResponseError) as err: print(f"Tx submission failed: {err}")
After this, I went to the Demo Wallet and logged in with my secret key, then I clicked to claim the balance.
I expect to claim the balance and receive it to my account.
I received the following error:
instruction: Claiming asset native:undefined
native:undefined
instruction: Not a trusted asset, need to add a trustline
instruction: Adding native:undefined trustline
instruction: Loading account to get a sequence number for add trustline transaction
instruction: Building add trustline transaction
error: Add trustline transaction failed
Issuer cannot be null
error: Issuer cannot be null
The text was updated successfully, but these errors were encountered:
Will triage this week 10/18
Sorry, something went wrong.
Thanks for the well-written issue @CaioTeixeira95! It was easy to replicate and find the issue. Will be fixing during this sprint.
@CaioTeixeira95 the fix is live, please let us know if there is still an issue with it. Thanks again for reporting! 🙌
quietbits
Successfully merging a pull request may close this issue.
Hello everyone!
What version are you using?
SDK Version 4.1.1
What did you do?
I tried to claim a balance for the native asset on the Demo wallet.
First I ran the following script:
After this, I went to the Demo Wallet and logged in with my secret key, then I clicked to claim the balance.
What did you expect to see?
I expect to claim the balance and receive it to my account.
What did you see instead?
I received the following error:
instruction: Claiming asset
native:undefined
instruction: Not a trusted asset, need to add a trustline
instruction: Adding
native:undefined
trustlineinstruction: Loading account to get a sequence number for add trustline transaction
instruction: Building add trustline transaction
error: Add trustline transaction failed
error: Issuer cannot be null
The text was updated successfully, but these errors were encountered: