mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 04:05:49 +00:00
Added investigate and clear for individual freeze
This commit is contained in:
@@ -28,7 +28,7 @@ async function main() {
|
|||||||
// Investigate ----------------------------------------------------------------
|
// Investigate ----------------------------------------------------------------
|
||||||
console.log(
|
console.log(
|
||||||
`You would investigate whatever prompted you to freeze the account now...`)
|
`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 -------------------------------------------
|
// Now we disable the global freeze -------------------------------------------
|
||||||
const accountSetTx2 = {
|
const accountSetTx2 = {
|
||||||
|
|||||||
@@ -75,6 +75,21 @@ 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.submitReliable(wallet, 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.")
|
console.log("Finished submitting. Now disconnecting.")
|
||||||
await client.disconnect()
|
await client.disconnect()
|
||||||
|
|||||||
Reference in New Issue
Block a user