Apply suggestions from code review

Co-authored-by: Rome Reginelli <rome@ripple.com>
This commit is contained in:
Maria Shodunke
2025-08-26 09:51:20 +01:00
committed by akcodez
parent bd456557ae
commit 73b90de313
3 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
// In browsers, use a <script> tag. In Node.js, uncomment the following line:
// You can also use a <script> tag in browsers or require('xrpl') in Node.js
import xrpl from 'xrpl'
// Define the network client

View File

@@ -16,7 +16,8 @@ const fund_result = await client.fundWallet()
const test_wallet = fund_result.wallet
console.log(`Wallet: ${test_wallet.address}`)
console.log(`Balance: ${fund_result.balance}`)
console.log(`\nAccount Testnet Explorer URL:\nhttps://testnet.xrpl.org/accounts/${test_wallet.address}`)
console.log('Account Testnet Explorer URL:')
console.log(` https://testnet.xrpl.org/accounts/${test_wallet.address}`)
// @chunk-end
// To generate a wallet without funding it, uncomment the code below
@@ -48,7 +49,8 @@ client.request({
"streams": ["ledger"]
})
client.on("ledgerClosed", async (ledger) => {
console.log(`Ledger #${ledger.ledger_index} validated with ${ledger.txn_count} transactions!`)
console.log(`Ledger #${ledger.ledger_index} validated ` +
`with ${ledger.txn_count} transactions!`)
})
// @chunk-end

View File

@@ -66,7 +66,7 @@ Follow the steps to create a simple application with `xrpl.js`.
<!-- Web steps -->
{% step id="import-web-tag" when={ "environment": "Web" } %}
To load `xrpl.js` into your project, add a `<script>` tag such as the following to your HTML.
To load `xrpl.js` into your project, add a `<script>` tag to your HTML.
You can load the library from a CDN as in the example, or download a release and host it on your own website.