Added investigate and clear for individual freeze

This commit is contained in:
Jackson Mills
2021-10-18 15:33:24 -07:00
parent 54492217a9
commit 68c0088480
2 changed files with 16 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ async function main() {
// Investigate ----------------------------------------------------------------
console.log(
`You would investigate whatever prompted you to freeze the account now...`)
await new Promise(resolve => setTimeout(resolve, 3000))
await new Promise(resolve => setTimeout(resolve, 5000))
// Now we disable the global freeze -------------------------------------------
const accountSetTx2 = {

View File

@@ -75,6 +75,21 @@ async function main() {
// Submit a TrustSet transaction to set an individual freeze ----------------------
console.log('Submitting TrustSet tx:', trust_set)
const result = await client.submitReliable(wallet, trust_set)
console.log("Submitted TrustSet!")
// Investigate --------------------------------------------------------------------
console.log(
`You would investigate whatever prompted you to freeze the trust line now...`)
await new Promise(resolve => setTimeout(resolve, 5000))
// Clear the individual freeze ----------------------------------------------------
// We're reusing our TrustSet transaction from earlier with a different flag
trust_set.Flags = xrpl.TrustSetFlags.tfClearFreeze
// Submit a TrustSet transaction to set an individual freeze ----------------------
console.log('Submitting TrustSet tx:', trust_set)
const result2 = await client.submitReliable(wallet, trust_set)
console.log("Submitted TrustSet!")
console.log("Finished submitting. Now disconnecting.")
await client.disconnect()