mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
Fix syntax to match xrpl newest version + fix validate
This commit is contained in:
@@ -22,9 +22,6 @@ async function main() {
|
||||
peer: counterparty_address,
|
||||
}
|
||||
|
||||
// Best practice for JS users - validate checks if a transaction is well-formed
|
||||
xrpl.validate(account_lines)
|
||||
|
||||
console.log(`Looking up all trust lines from
|
||||
${counterparty_address} to ${my_address}`)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ async function main() {
|
||||
|
||||
// Sign and submit the AccountSet transaction to enable a global freeze -------
|
||||
console.log('Signing and submitting the transaction:', accountSetTx)
|
||||
await client.submitAndWait(wallet, accountSetTx)
|
||||
await client.submitAndWait(accountSetTx, { wallet: wallet })
|
||||
console.log("Finished submitting!")
|
||||
|
||||
// Checking the status of the global freeze -----------------------------------
|
||||
@@ -59,7 +59,7 @@ async function main() {
|
||||
|
||||
// Sign and submit the AccountSet transaction to enable a global freeze -------
|
||||
console.log('Signing and submitting the transaction:', accountSetTx2)
|
||||
const result = await client.submitAndWait(wallet, accountSetTx2)
|
||||
const result = await client.submitAndWait(accountSetTx2, { wallet: wallet })
|
||||
console.log("Finished submitting!")
|
||||
|
||||
// Checking the status of the global freeze -----------------------------------
|
||||
|
||||
@@ -27,7 +27,7 @@ async function main() {
|
||||
|
||||
// Sign and submit the AccountSet transaction to enable a global freeze ------
|
||||
console.log('Signing and submitting the transaction:', accountSetTx)
|
||||
await client.submitAndWait(wallet, accountSetTx)
|
||||
await client.submitAndWait(accountSetTx, { wallet })
|
||||
console.log(`Finished submitting! ${wallet.address} should be frozen now.`)
|
||||
|
||||
// Investigate ---------------------------------------------------------------
|
||||
@@ -48,7 +48,7 @@ async function main() {
|
||||
|
||||
// Sign and submit the AccountSet transaction to end a global freeze ---------
|
||||
console.log('Signing and submitting the transaction:', accountSetTx2)
|
||||
const result = await client.submitAndWait(wallet, accountSetTx2)
|
||||
const result = await client.submitAndWait(accountSetTx2, { wallet: wallet })
|
||||
console.log("Finished submitting!")
|
||||
|
||||
// Global freeze disabled
|
||||
|
||||
@@ -78,7 +78,7 @@ async function main() {
|
||||
|
||||
// Submit a TrustSet transaction to set an individual freeze ----------------------
|
||||
console.log('Submitting TrustSet tx:', trust_set)
|
||||
const result = await client.submitAndWait(wallet, trust_set)
|
||||
const result = await client.submitAndWait(trust_set, { wallet: wallet })
|
||||
console.log("Submitted TrustSet!")
|
||||
|
||||
// Investigate --------------------------------------------------------------------
|
||||
@@ -92,7 +92,7 @@ async function main() {
|
||||
|
||||
// Submit a TrustSet transaction to clear an individual freeze --------------------
|
||||
console.log('Submitting TrustSet tx:', trust_set)
|
||||
const result2 = await client.submitAndWait(wallet, trust_set)
|
||||
const result2 = await client.submitAndWait(trust_set, { wallet: wallet })
|
||||
console.log("Submitted TrustSet!")
|
||||
|
||||
console.log("Finished submitting. Now disconnecting.")
|
||||
|
||||
@@ -27,7 +27,7 @@ async function main() {
|
||||
xrpl.validate(accountSetTx)
|
||||
|
||||
console.log('Sign and submit the transaction:', accountSetTx)
|
||||
await client.submitAndWait(wallet, accountSetTx)
|
||||
await client.submitAndWait(accountSetTx, { wallet: wallet })
|
||||
|
||||
// Done submitting
|
||||
console.log("Finished submitting. Now disconnecting.")
|
||||
|
||||
Reference in New Issue
Block a user