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',