Skip to content

Commit

Permalink
Push stakes => staked update
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmell committed Feb 21, 2024
1 parent 38e3c56 commit d22e3d2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/services/creatorStaking/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { WithApis } from '../types'
import BN from 'bignumber.js'
import { isDef } from '@subsocial/utils'
import { rpcQuery } from '../rpc'

Expand Down Expand Up @@ -117,9 +116,7 @@ export const getGeneralBackerInfo = async ({ apis, spaceIds, account }: GeneralS
spaceIds.forEach((id, index) => {
const value = generalStakerInfoResult[index]?.toJSON() as any
if (value || value !== null) {
const stakes = value.stakes.sort((a, b) => new BN(b.era).minus(new BN(a.era)))

generalStakerInfo[id] = stakes
generalStakerInfo[id] = value.staked
}
})

Expand Down

0 comments on commit d22e3d2

Please sign in to comment.