xrpl.js 2.0: small code updates

This commit is contained in:
mDuo13
2021-10-13 17:37:37 -07:00
parent 46b9a90c08
commit 69641175ce
4 changed files with 4 additions and 7 deletions

View File

@@ -10,8 +10,8 @@ async function main() {
await client.connect()
// Create a wallet and fund it with the Testnet faucet:
const test_wallet = new xrpl.Wallet() // TODO: change to define based on fundWallet result
const fund_result = await client.fundWallet(test_wallet)
const test_wallet = fund_result.wallet
console.log(fund_result)
// Get info from the ledger about the address we just funded

View File

@@ -32,10 +32,7 @@ api.on('connected', async () => {
// The earliest ledger a transaction could appear in is the first ledger
// after the one that's already validated at the time it's *first* submitted.
const min_ledger = (await api.getLedgerIndex()) + 1
const result = await api.request({
"command": "submit",
"tx_blob": signed.tx_blob
})
const result = await api.submit(signed.tx_blob)
console.log("Tentative result code:", result.result.engine_result)
console.log("Tentative result message:", result.result.engine_result_message)