Last active
March 28, 2022 07:31
-
-
Save euije/3b8c2e81c4fb7ef412ad3e0264d159c0 to your computer and use it in GitHub Desktop.
getBalance Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const getBalance = (address) => { | |
| return caver.rpc.klay.getBalance(address).then((response) => { | |
| const balance = caver.utils.convertFromPeb(caver.utils.hexToNumberString(response)); | |
| console.log(balance); | |
| return balance; | |
| }) | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment