Skip to content

Commit

Permalink
Merge pull request #164 from Juneo-io/dev
Browse files Browse the repository at this point in the history
getTotalStakeable only returns P-Chain amount
  • Loading branch information
alekswaslet authored Jul 18, 2024
2 parents d776cad + 36a1353 commit a419a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "juneojs",
"version": "0.0.128",
"version": "0.0.129",
"description": "Juneo JS Library",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/account/mcn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type TokenAsset } from '../../asset'
import { type Blockchain } from '../../chain'
import { PLATFORMVM_ID, type Blockchain } from '../../chain'
import { type MCNProvider } from '../../juneo'
import { AccountError, sortSpendings, type AssetValue } from '../../utils'
import {
Expand Down Expand Up @@ -88,7 +88,7 @@ export class MCNAccount {
getTotalStakeableAmount (assetId: string): bigint {
let totalAmount: bigint = BigInt(0)
for (const [, account] of this.chainAccounts) {
if (account.type === AccountType.Utxo) {
if (account.chain.vm.id === PLATFORMVM_ID) {
totalAmount += (account as UtxoAccount).getStakeableBalance(assetId).getValue()
}
}
Expand Down

0 comments on commit a419a85

Please sign in to comment.