We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to set proxies for the network I get the following error Cannot read properties of undefined (reading 'accountId')
Cannot read properties of undefined (reading 'accountId')
Example:
import { Client, AccountId, PrivateKey, Hbar, TransferTransaction} from "@hashgraph/sdk" import dotenv from 'dotenv' dotenv.config(); const main = async () => { const nodes = { "34.94.106.61:50211": new AccountId(3), "50.18.132.211:50211": new AccountId(3), "35.237.119.55:50211": new AccountId(4), "3.212.6.13:50211": new AccountId(4), "35.245.27.193:50211": new AccountId(5), "52.20.18.86:50211": new AccountId(5), }; const originAccountId = AccountId.fromString(process.env.OPERATOR_ID); const privateKey = PrivateKey.fromStringED25519(process.env.OPERATOR_KEY); const targetAccountId = AccountId.fromString(process.env.TARGET_ID); const client = Client.forNetwork(nodes) client.setOperator(originAccountId, privateKey); const validHbar = (hbars) => { return typeof hbars == "number" ? new Hbar(hbars.toFixed(6)) : new Hbar(Number(hbars).toFixed(6)); }; const hbarAmount = validHbar(2); const txResponse = new TransferTransaction() .setMaxTransactionFee(new Hbar(5)) .addHbarTransfer(originAccountId, hbarAmount.negated()) .addHbarTransfer(targetAccountId, hbarAmount) .freezeWith(client); console.log("executing transaction..."); const txSubmit = await txResponse.execute(client); const receipt = await txSubmit.getReceipt(client); console.log("Receipt:", receipt); client.close() }; main();
No response
testnet
v2.40.0
None
The text was updated successfully, but these errors were encountered:
[#2102] Cannot read properties of undefined (reading 'accountId') (#2103
cb01e23
) * add a node to the selected nodes if only it hasn't been added already Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech> * remove creating function within loops Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech> * refactor code Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech> * fix Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech> * adding logger Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech> * formatting Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech> --------- Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
svetoslav-nikol0v
Successfully merging a pull request may close this issue.
Description
When I try to set proxies for the network I get the following error
Cannot read properties of undefined (reading 'accountId')
Steps to reproduce
Example:
Additional context
No response
Hedera network
testnet
Version
v2.40.0
Operating system
None
The text was updated successfully, but these errors were encountered: