Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
),
...update.signersToAdd.map(signer =>
Operation.setOptions({
signer: { ed25519PublicKey: signer.key, weight: signer.weight }
})
)
]
if (
update.weightThreshold !== props.accountData.thresholds.low_threshold &&
update.weightThreshold !== props.accountData.thresholds.med_threshold &&
update.weightThreshold !== props.accountData.thresholds.high_threshold
) {
operations.push(
Operation.setOptions({
lowThreshold: update.weightThreshold,
medThreshold: update.weightThreshold,
highThreshold: update.weightThreshold
})
)
}
const tx = await createTransaction(operations, {
accountData: props.accountData,
horizon: props.horizon,
walletAccount: props.account
})
const submissionPromise = props.sendTransaction(tx)
setTxCreationPending(false)
const submitTransaction = async (newDestination: string) => {
const transaction = await createTransaction(
[
Operation.setOptions({
source: props.account.publicKey,
inflationDest: newDestination
})
],
{ accountData, horizon: props.horizon, walletAccount: props.account }
)
await props.sendTransaction(transaction)
setTimeout(props.onClose, 1000)
}
const promise = (async () => {
const account = await testnetHorizon.loadAccount("GBPBFWVBADSESGADWEGC7SGTHE3535FWK4BS6UW3WMHX26PHGIH5NF4W")
return buildTransaction(account, [
Operation.createAccount({
startingBalance: "1.0",
destination: "GA2CZKBI2C55WHALSTNPG54FOQCLC6Y4EIATZEIJOXWQPSEGN4CWAXFT"
}),
Operation.setOptions({
inflationDest: "GCCD6AJOYZCUAQLX32ZJF2MKFFAUJ53PVCFQI3RHWKL3V47QYE2BNAUT"
})
])
})()
...update.signersToAdd.map(signer =>
Operation.setOptions({
signer: { ed25519PublicKey: signer.key, weight: signer.weight }
})
)