We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 983c18c + 139c185 commit 721e4e1Copy full SHA for 721e4e1
src/account.js
@@ -150,12 +150,11 @@ export class Account {
150
NOTE that the token ID from the system contract is not supported due to the pre-defined & built-in nature
151
of system contract.
152
* @param {string} tokId - The token ID.
153
- * @returns {md.VSYS} The account's effective balance.
+ * @returns {md.Token} The account's balance of the given token.
154
*/
155
async getTokBal(tokId) {
156
- const tc = await tcf.fromTokId(new md.TokenID(tokId), this.chain);
157
const resp = await this.api.ctrt.getTokBal(this.addr.data, tokId);
158
- return new md.Token(resp.balance, await tc.getUnit());
+ return md.Token.fromNumber(resp.balance, resp.unity);
159
}
160
161
/**
0 commit comments