Skip to content

Commit

Permalink
fix: action queue bug introduced when switching source of actions fro…
Browse files Browse the repository at this point in the history
…m newAllocations to selectedSubgraphs
  • Loading branch information
vincenttaglia committed Oct 13, 2024
1 parent 5981c43 commit 376afb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/store/allocations.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ export const useAllocationStore = defineStore('allocationStore', {
subgraphDeployment{
versions(first:1, orderBy:version, orderDirection:desc){
subgraph{
id
metadata{
image
displayName
Expand Down
4 changes: 2 additions & 2 deletions src/store/newAllocationSetter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 376afb8

Please sign in to comment.