Skip to content

Commit

Permalink
feat: update contextAction for plotAction
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyjackal committed Jul 8, 2024
1 parent 9ac7ae9 commit ec0d1db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/contextualizers/protocol/skyoneer/plotAction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Skyoneer PlotAction', () => {
);
expect(transaction1.context?.summaries?.en.title).toBe('Skyoneer');
expect(contextSummary(transaction1.context)).toBe(
'0x402533d5240a0c51e02d3714c0d0a057384d4872 HARVESTED_PLOT 257 0x9c82ca3332898bea9c9fa5f9642ba4a4628e1321',
'0x402533d5240a0c51e02d3714c0d0a057384d4872 HARVESTED 257 0x9c82ca3332898bea9c9fa5f9642ba4a4628e1321',
);
expect(containsBigInt(transaction1.context)).toBe(false);

Expand All @@ -44,7 +44,7 @@ describe('Skyoneer PlotAction', () => {
);
expect(transaction2.context?.summaries?.en.title).toBe('Skyoneer');
expect(contextSummary(transaction2.context)).toBe(
'0xf1fbb7b98d1fd2037e80ac41486d761ccf7735e7 CLEARED_HARVEST',
'0xf1fbb7b98d1fd2037e80ac41486d761ccf7735e7 CLEARED_GROWING_CROPS',
);
expect(containsBigInt(transaction2.context)).toBe(false);

Expand All @@ -62,7 +62,7 @@ describe('Skyoneer PlotAction', () => {
);
expect(transaction4.context?.summaries?.en.title).toBe('Skyoneer');
expect(contextSummary(transaction4.context)).toBe(
'0xf1fbb7b98d1fd2037e80ac41486d761ccf7735e7 CLEARED_HARVEST',
'0xf1fbb7b98d1fd2037e80ac41486d761ccf7735e7 CLEARED_DEAD_CROPS',
);
expect(containsBigInt(transaction4.context)).toBe(false);
});
Expand Down
6 changes: 3 additions & 3 deletions src/contextualizers/protocol/skyoneer/plotAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function generate(transaction: Transaction): Transaction {
},
harvested: {
type: 'contextAction',
value: SkyoneerContextActionEnum.HARVESTED_PLOT,
value: SkyoneerContextActionEnum.HARVESTED,
},
},
};
Expand All @@ -123,7 +123,7 @@ export function generate(transaction: Transaction): Transaction {
},
clearedHarvest: {
type: 'contextAction',
value: SkyoneerContextActionEnum.CLEARED_HARVEST,
value: SkyoneerContextActionEnum.CLEARED_DEAD_CROPS,
},
},
};
Expand All @@ -145,7 +145,7 @@ export function generate(transaction: Transaction): Transaction {
},
clearedHarvest: {
type: 'contextAction',
value: SkyoneerContextActionEnum.CLEARED_HARVEST,
value: SkyoneerContextActionEnum.CLEARED_GROWING_CROPS,
},
},
};
Expand Down
10 changes: 6 additions & 4 deletions src/types/contextAction/protocolContextAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,18 @@ export type BoomboxContextAction =
export enum SkyoneerContextActionEnum {
ACTIVATED_A_STARTER_PACK = 'ACTIVATED_A_STARTER_PACK',
RECEIVED = 'RECEIVED',
HARVESTED_PLOT = 'HARVESTED_PLOT',
CLEARED_HARVEST = 'CLEARED_HARVEST',
HARVESTED = 'HARVESTED',
CLEARED_GROWING_CROPS = 'CLEARED_GROWING_CROPS',
CLEARED_DEAD_CROPS = 'CLEARED_DEAD_CROPS',
PLANTED = 'PLANTED',
}

export type SkyoneerContextAction =
| SkyoneerContextActionEnum.ACTIVATED_A_STARTER_PACK
| SkyoneerContextActionEnum.RECEIVED
| SkyoneerContextActionEnum.HARVESTED_PLOT
| SkyoneerContextActionEnum.CLEARED_HARVEST
| SkyoneerContextActionEnum.HARVESTED
| SkyoneerContextActionEnum.CLEARED_GROWING_CROPS
| SkyoneerContextActionEnum.CLEARED_DEAD_CROPS
| SkyoneerContextActionEnum.PLANTED;

export enum Protocols {
Expand Down

0 comments on commit ec0d1db

Please sign in to comment.