Im building a bot that connects Stellar with Telegram but when I generate a new set of key pairs them don't match when I sign in stellarterm.
Here is the code:
var StellarSdk = require('stellar-sdk');
// Stellar
function Wallet(){
var pair = StellarSdk.Keypair.random();
return{
secret: pair.secret(),
public: pair.publicKey()
}
}
I'm trying to access like this:
Wallet().secret
Wallet().public
But it returns me wrong set of pair keys. Any idea why it is happening and how can I fix it?