Comment set-global-freeze and remove old import

This commit is contained in:
Jackson Mills
2021-10-18 10:32:08 -07:00
parent 181ce464c3
commit 0584000b20
2 changed files with 8 additions and 5 deletions

View File

@@ -8,22 +8,26 @@ async function main() {
client.on('error', (errorCode, errorMessage) => { client.on('error', (errorCode, errorMessage) => {
console.log(errorCode + ': ' + errorMessage) console.log(errorCode + ': ' + errorMessage)
}) })
// Get credentials from the Testnet Faucet ------------------------------------
console.log("Requesting an address from the Testnet faucet...")
const { wallet, balance } = await client.fundWallet() const { wallet, balance } = await client.fundWallet()
// Prepare a settings transaction to enable global freeze // Prepare an AccountSet transaction to enable global freeze ------------------
const accountSetTx = { const accountSetTx = {
TransactionType: "AccountSet", TransactionType: "AccountSet",
Account: wallet.address, Account: wallet.address,
// Send a flag to turn on a global freeze on this account // Set a flag to turn on a global freeze on this account
SetFlag: xrpl.AccountSetAsfFlags.asfGlobalFreeze SetFlag: xrpl.AccountSetAsfFlags.asfGlobalFreeze
} }
// Sign and submit the settings transaction // Sign and submit the AccountSet transaction to enable a global freeze -------
console.log('Sign and submit the transaction:', accountSetTx) console.log('Sign and submit the transaction:', accountSetTx)
await client.submitReliable(wallet, accountSetTx) await client.submitReliable(wallet, accountSetTx)
console.log("Finished submitting. Now disconnecting.")
await client.disconnect() await client.disconnect()
// End main()
} }
main().catch(console.error) main().catch(console.error)

View File

@@ -1,4 +1,3 @@
const { validate } = require('xrpl')
const xrpl = require('xrpl') const xrpl = require('xrpl')
async function main() { async function main() {