Post
Share your knowledge.
How to get remaining balance after a transaction using TypeScript?
I'm working on a project using the TypeScript SDK and need to fetch the recipient and balance left after a transaction. I tried using the showBalanceChanges option, but it's giving me the amount used in the transaction. How can I obtain the remaining balance after the transaction is completed?
- Move CLI
Answers
2If the showBalanceChanges
option only gives you the amount used, try using the getBalance
method. You can find more details here: getBalance Method. This method should help you fetch the remaining balance after the transaction.
You have to pass the showBalanceChanges option in your request like this: options: { showBalanceChanges: true }
.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.