Closed yanielbf closed 5 months ago
1.3.1
I am using React Native with Expo. I am triying to create account in Stellar Ledger
function generateRandomKeypair() { let wallet = new Wallet({ stellarConfiguration: StellarConfiguration.TestNet(), }); const account = wallet.stellar().account(); const randomBytes = Crypto.getRandomBytes(32); return account.createKeypairFromRandom(Buffer.from(randomBytes)); } async function handlerCreateAccount() { const parentAccount = SigningKeypair.fromSecret( "SBW5TWYWFRGPPCSBMLN2K7HDMKWUGLFPF5FMMSZQX7CT65EIQ5V5L43N" ); const childAccount = generateRandomKeypair(); let wallet = new Wallet({ stellarConfiguration: StellarConfiguration.TestNet(), }); const txBuilder = await wallet.stellar().transaction({ sourceAddress: parentAccount, }); const tx = txBuilder.createAccount(childAccount).build(); parentAccount.sign(tx); await wallet.stellar().submitTransaction(tx); }
I tested in codesanbox for react project and it's throwing same error
https://codesandbox.io/p/sandbox/loving-dewdney-s9n2dq?file=%2Fsrc%2FApp.js%3A25%2C29
Create new account in Stellar Ledger
node_modules\@stellar\typescript-wallet-sdk\src\walletSdk\Horizon\Transaction\TransactionBuilder.ts
hey @yanielbf thanks for pointing this out. This was fixed in our 1.4.0 release which was just published. If you upgrade to that version it should be fixed
What version are you using?
1.3.1
What did you do?
I am using React Native with Expo. I am triying to create account in Stellar Ledger
I tested in codesanbox for react project and it's throwing same error
https://codesandbox.io/p/sandbox/loving-dewdney-s9n2dq?file=%2Fsrc%2FApp.js%3A25%2C29
What did you expect to see?
Create new account in Stellar Ledger
What did you see instead?
node_modules\@stellar\typescript-wallet-sdk\src\walletSdk\Horizon\Transaction\TransactionBuilder.ts