mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 11:55:50 +00:00
Apply suggestions from code review
Co-authored-by: Rome Reginelli <rome@ripple.com>
This commit is contained in:
committed by
Maria Shodunke
parent
dff3298d60
commit
126cdbb00a
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user