Skip to content

Commit

Permalink
Fix deprecation warning when building a transaction (#537)
Browse files Browse the repository at this point in the history
Per deprecation warning message, which links to here:

stellar/js-stellar-base#207
  • Loading branch information
grempe committed Apr 28, 2020
1 parent b6ee517 commit 51bb5e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/reference/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ See the [Building Transactions](https://www.stellar.org/developers/js-stellar-ba
Once you have built your transaction, you can submit it to the Stellar network with `Server.submitTransaction()`.
```js
const StellarSdk = require('stellar-sdk')
StellarSdk.Network.useTestNetwork();
const server = new StellarSdk.Server('https://horizon-testnet.stellar.org');

(async function main() {
Expand All @@ -112,7 +111,7 @@ const server = new StellarSdk.Server('https://horizon-testnet.stellar.org');
*/
const fee = await server.fetchBaseFee();

const transaction = new StellarSdk.TransactionBuilder(account, { fee })
const transaction = new StellarSdk.TransactionBuilder(account, { fee, networkPassphrase: StellarSdk.Networks.TESTNET })
.addOperation(
// this operation funds the new account with XLM
StellarSdk.Operation.payment({
Expand Down

0 comments on commit 51bb5e2

Please sign in to comment.