xssnick / tonutils-go

TON SDK Library in pure Golang for interacting with The Open Network ecosystem using native protocols, such as ADNL, RLDP and etc.
Apache License 2.0
535 stars 109 forks source link

Properly get the V5R1 wallet #250

Closed pddmergilla-ns closed 1 month ago

pddmergilla-ns commented 1 month ago

hi, please help me with this..

I need to get my V5R1 wallet so I'm using this:

w, err := wallet.FromSeed(api, words, wallet.ConfigV5R1Final{
    NetworkGlobalID: wallet.MainnetGlobalID,
})

and true enough I'm getting my wallet, checked the balance and it's correct. However I can't use this in a transaction, my guess is that because I'm using Mainnet as the GlobalID and we're using testnet for testing. I'm getting this kind of error:

image

But whenever I tried

w, err := wallet.FromSeed(api, words, wallet.ConfigV5R1Final{
    NetworkGlobalID: wallet.TestnetGlobalID,
})

I'm getting a different wallet address (which is unused, and the balance is zero) so I can't use that as well.

Is there a way to get a V5R1 wallet for testing?

Thanks!

xssnick commented 1 month ago

Hi, share your ton address (which is with balance), please, or check transaction exit code

pddmergilla-ns commented 1 month ago

Hi, share your ton address (which is with balance), please, or check transaction exit code

the one I encountered the error with? This one: 0QDLpCtyN8Rjc0mwY3pwVvDIWYzyZFmBqeRpc6lT9fUyQl9A

thanks for the reply @xssnick !

xssnick commented 1 month ago

I see that exit code is 137 (external_send_message_must_have_ignore_errors_send_mode), for v5 message mode must include IgnoreErrors flag, eg: Mode: PayGasSeparately + IgnoreErrors

pddmergilla-ns commented 1 month ago

I see that exit code is 137 (external_send_message_must_have_ignore_errors_send_mode), for v5 message mode must include IgnoreErrors flag, eg: Mode: PayGasSeparately + IgnoreErrors

this is working well, thanks! <3