Skip to content

Commit

Permalink
fix: Filter auctions based on network (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
aomafarag authored Dec 8, 2022
1 parent ae40099 commit b04eb97
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/store/auctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ const getInitialState = (): State => ({
export const state = (): State => getInitialState();

export const getters = {
listAuctions(state: State): AuctionTransaction[] {
return Object.values(state.auctionStorage);
},
listAuctionTransactions(state: State, getters: any, _rootState: any): AuctionTransaction[] {
const auctions = Object.values(state.auctionStorage);
listAuctionTransactions(state: State, getters: any, _rootState: any, rootGetters: any): AuctionTransaction[] {
const network = rootGetters['network/getMakerNetwork'];
const auctions = Object.values(state.auctionStorage).filter(auction => auction.network === network);
return auctions.map(auction => {
const isRestarting = getters.isAuctionRestarting(auction.id);
return {
Expand Down

0 comments on commit b04eb97

Please sign in to comment.