From 5981c433917517bd6c0f16d4a81db099a7ceb808 Mon Sep 17 00:00:00 2001 From: Vincent Taglia Date: Sat, 12 Oct 2024 22:14:22 -0500 Subject: [PATCH 1/4] fix: correctly align refresh button icon --- src/views/ActionQueueManager.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ActionQueueManager.vue b/src/views/ActionQueueManager.vue index d8309f6..edc021f 100644 --- a/src/views/ActionQueueManager.vue +++ b/src/views/ActionQueueManager.vue @@ -21,7 +21,7 @@
- + Date: Sun, 13 Oct 2024 15:05:17 -0500 Subject: [PATCH 2/4] 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', From 0b47e5404926db7e2c17565629b412699f3bf5ca Mon Sep 17 00:00:00 2001 From: Vincent Taglia Date: Sun, 13 Oct 2024 15:08:26 -0500 Subject: [PATCH 3/4] fix: same unselecting bug as action queue API for action queue commands --- src/store/newAllocationSetter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/newAllocationSetter.js b/src/store/newAllocationSetter.js index 8391379..db16f8e 100644 --- a/src/store/newAllocationSetter.js +++ b/src/store/newAllocationSetter.js @@ -211,8 +211,8 @@ export const useNewAllocationSetterStore = defineStore('allocationSetter', { customPOI = `${state.customPOIs[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]} true `; } } - if(Object.keys(state.newAllocations).includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash)){ - if(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18) > BigNumber(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash])){ + if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.versions[0].subgraph.id)){ + if(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18).gt(BigNumber(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]))){ reallocate += `graph indexer actions queue reallocate ${allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash} ${allocationStore.getSelectedAllocations[i].id} ${state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]} ${customPOI}--network ${chainStore.getActiveChain.id}\n`; } else{ reallocate2 += `graph indexer actions queue reallocate ${allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash} ${allocationStore.getSelectedAllocations[i].id} ${state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]} ${customPOI}--network ${chainStore.getActiveChain.id}\n`; From 00dcd8f143166276e6451016fde17b79c6c3d6ab Mon Sep 17 00:00:00 2001 From: Vincent Taglia Date: Sun, 13 Oct 2024 15:22:37 -0500 Subject: [PATCH 4/4] fix: selected subgraphs is an array of ipfs hashes on this branch --- src/store/newAllocationSetter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/newAllocationSetter.js b/src/store/newAllocationSetter.js index c3166d2..75805ea 100644 --- a/src/store/newAllocationSetter.js +++ b/src/store/newAllocationSetter.js @@ -211,7 +211,7 @@ export const useNewAllocationSetterStore = defineStore('allocationSetter', { customPOI = `${state.customPOIs[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]} true `; } } - if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.versions[0].subgraph.id)){ + if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash)){ if(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18).gt(BigNumber(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]))){ reallocate += `graph indexer actions queue reallocate ${allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash} ${allocationStore.getSelectedAllocations[i].id} ${state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]} ${customPOI}--network ${chainStore.getActiveChain.id}\n`; } else{ @@ -235,7 +235,7 @@ export const useNewAllocationSetterStore = defineStore('allocationSetter', { let skip = []; for(const i in allocationStore.getSelectedAllocations){ let allo = {}; - if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.versions[0].subgraph.id)){ + if(subgraphStore.selected.includes(allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash)){ //console.log("CHECK"); //console.log(BigNumber(allocationStore.getSelectedAllocations[i].allocatedTokens).dividedBy(10**18).toString()); //console.log(state.newAllocations[allocationStore.getSelectedAllocations[i].subgraphDeployment.ipfsHash]);