you have some data in local storage like egld ballance and nonce, but it's best to refresh it using the API
mor8331052732 activity
mor8331052732 commented on Hi. May I know what are you doing with the signature parameter? Why do you need it? What's the purpose of the signature in the callback for /hook/login?
with the signature you can login someone on you dApp. For example if you have a backend in your application and you want to verify that the one who makes the actions on your dApp is the owner of the wallet, you have to verify his signature there
mor8331052732 commented on Can you share a bit of the code used to create and call the url?
i'm using the component WebWalletLoginButton from DappUI library
mor8331052732 commented on @morfilio what erdjs version are you using btw?
cc @constantintovisi @Stan_Sava i've updated to dapp-core 1.2.7 and erdjs 10.2.5 and now it doesn't work on live domain neither on localhost????
mor8331052732 commented on @morfilio what erdjs version are you using btw?
@elrondnetwork/erdjs": "9.0.3"
mor8331052732 commented on Hi! This was working until yesterday/today on production. We're also having an issue with this. Not really sure what changed and why the Elrond Wallet isn't returning a signed message any more. Anybody got any idea when this will be fixed or if it will be fixed any time soon?
for me it isn't working for about 2-3 weeks, when i first tried it...
mor8331052732 commented on What kind of token are you using? Where is it generated?
i just tried without any token now, the same. The callback url has no signature, only address
mor8331052732 commented on What kind of token are you using? Where is it generated?
just like this:
mor8331052732 commented on I need help again. I want to use sendTransactions from dapp-core v1.2.7 and everything is working fine. After the transaction is signed I am getting redirected to my website and a notification is displayed at the bottom right corner with the transaction progress. Now I don't know how to get notified... Read more
const transactionStatus = transactionServices.useTrackTransactionStatus({ transactionId: transactionSessionId, })
mor8331052732 commented on For example, many transactions are sent at the same time. So what is the transaction processing priority mechanism here?
it's based on nonce number, if you send many transactions at the same time, you have to increment the nonce manually for each transaction, if not, only one transaction will work on one round
mor8331052732 commented on What should I send to backend and I will be sure that it's owner of th wallet?
func CheckSignature(address string, sig string) bool { _, decodedAddress, _ := bech32.Decode(address) decodedBytes, err := bech32.ConvertBits(decodedAddress, byte(5), byte(8), !true) if err != nil { log.Fatal().Err(err).Msg("Address decode error: ") } token := "asd" prefix := "\x17Elrond Signed Message:\n" message := address + token + "{}" data := []byte(prefix + strconv.Itoa(len(message)) + message) hash := sha3.NewLegacyKeccak256() hash.Write(data) hashedMessage := hash.Sum(nil) decodedSig, _ := hex.DecodeString(sig) verified := ed25519.Verify(decodedBytes, hashedMessage, decodedSig) return verified } here it's my example GO code for validation on backend