Fix syntax to match xrpl newest version + fix validate

This commit is contained in:
Jackson Mills
2021-10-21 16:54:18 -07:00
parent 10a2365559
commit bae05b1cc0
5 changed files with 7 additions and 10 deletions

View File

@@ -22,9 +22,6 @@ async function main() {
peer: counterparty_address, 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 console.log(`Looking up all trust lines from
${counterparty_address} to ${my_address}`) ${counterparty_address} to ${my_address}`)

View File

@@ -27,7 +27,7 @@ async function main() {
// Sign and submit the AccountSet transaction to enable a global freeze ------- // Sign and submit the AccountSet transaction to enable a global freeze -------
console.log('Signing and submitting the transaction:', accountSetTx) console.log('Signing and submitting the transaction:', accountSetTx)
await client.submitAndWait(wallet, accountSetTx) await client.submitAndWait(accountSetTx, { wallet: wallet })
console.log("Finished submitting!") console.log("Finished submitting!")
// Checking the status of the global freeze ----------------------------------- // 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 ------- // Sign and submit the AccountSet transaction to enable a global freeze -------
console.log('Signing and submitting the transaction:', accountSetTx2) 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!") console.log("Finished submitting!")
// Checking the status of the global freeze ----------------------------------- // Checking the status of the global freeze -----------------------------------

View File

@@ -27,7 +27,7 @@ async function main() {
// Sign and submit the AccountSet transaction to enable a global freeze ------ // Sign and submit the AccountSet transaction to enable a global freeze ------
console.log('Signing and submitting the transaction:', accountSetTx) 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.`) console.log(`Finished submitting! ${wallet.address} should be frozen now.`)
// Investigate --------------------------------------------------------------- // Investigate ---------------------------------------------------------------
@@ -48,7 +48,7 @@ async function main() {
// Sign and submit the AccountSet transaction to end a global freeze --------- // Sign and submit the AccountSet transaction to end a global freeze ---------
console.log('Signing and submitting the transaction:', accountSetTx2) 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!") console.log("Finished submitting!")
// Global freeze disabled // Global freeze disabled

View File

@@ -78,7 +78,7 @@ async function main() {
// Submit a TrustSet transaction to set an individual freeze ---------------------- // Submit a TrustSet transaction to set an individual freeze ----------------------
console.log('Submitting TrustSet tx:', trust_set) 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!") console.log("Submitted TrustSet!")
// Investigate -------------------------------------------------------------------- // Investigate --------------------------------------------------------------------
@@ -92,7 +92,7 @@ async function main() {
// Submit a TrustSet transaction to clear an individual freeze -------------------- // Submit a TrustSet transaction to clear an individual freeze --------------------
console.log('Submitting TrustSet tx:', trust_set) 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("Submitted TrustSet!")
console.log("Finished submitting. Now disconnecting.") console.log("Finished submitting. Now disconnecting.")

View File

@@ -27,7 +27,7 @@ async function main() {
xrpl.validate(accountSetTx) xrpl.validate(accountSetTx)
console.log('Sign and submit the transaction:', accountSetTx) console.log('Sign and submit the transaction:', accountSetTx)
await client.submitAndWait(wallet, accountSetTx) await client.submitAndWait(accountSetTx, { wallet: wallet })
// Done submitting // Done submitting
console.log("Finished submitting. Now disconnecting.") console.log("Finished submitting. Now disconnecting.")