From 376afb8e4851740720b19d9f1f6644e52a1da9c8 Mon Sep 17 00:00:00 2001 From: Vincent Taglia Date: Sun, 13 Oct 2024 15:05:17 -0500 Subject: [PATCH] fix: action queue bug introduced when switching source of actions from newAllocations to selectedSubgraphs --- src/store/allocations.js | 1 + src/store/newAllocationSetter.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/store/allocations.js b/src/store/allocations.js index 207a56c..e0f8123 100644 --- a/src/store/allocations.js +++ b/src/store/allocations.js @@ -433,6 +433,7 @@ export const useAllocationStore = defineStore('allocationStore', { subgraphDeployment{ versions(first:1, orderBy:version, orderDirection:desc){ subgraph{ + id metadata{ image displayName diff --git a/src/store/newAllocationSetter.js b/src/store/newAllocationSetter.js index 9568633..8391379 100644 --- a/src/store/newAllocationSetter.js +++ b/src/store/newAllocationSetter.js @@ -235,11 +235,11 @@ export const useNewAllocationSetterStore = defineStore('allocationSetter', { let skip = []; for(const i in allocationStore.getSelectedAllocations){ let allo = {}; - if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash)){ + if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.versions[0].subgraph.id)){ //console.log("CHECK"); //console.log(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18).toString()); //console.log(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]); - if(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18) > BigNumber(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash])){ + if(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18).gt(BigNumber(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]))){ allo = { status: 'queued', type: 'reallocate',