Skip to content

Commit

Permalink
feat: update description text for cleared harvest
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyjackal committed Jul 2, 2024
1 parent 58a41b1 commit a2413ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
16 changes: 8 additions & 8 deletions src/contextualizers/protocol/cropXyz/plotAction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ describe('CropXYZ PlotAction', () => {
);
expect(containsBigInt(transaction1.context)).toBe(false);

// const transaction2 = generate(
// cropXyzPlotAction0x9bb5a737 as unknown as Transaction,
// );
// expect(transaction2.context?.summaries?.en.title).toBe('CropXYZ');
// expect(contextSummary(transaction2.context)).toBe(
// '0x402533d5240A0c51e02d3714C0D0A057384D4872 HARVESTED_PLOT 257 0x9c82ca3332898bea9c9fa5f9642ba4a4628e1321',
// );
// expect(containsBigInt(transaction2.context)).toBe(false);
const transaction2 = generate(
cropXyzPlotAction0x9bb5a737 as unknown as Transaction,
);
expect(transaction2.context?.summaries?.en.title).toBe('CropXYZ');
expect(contextSummary(transaction2.context)).toBe(
'0xf1fbb7b98d1fd2037e80ac41486d761ccf7735e7 CLEARED_HARVEST',
);
expect(containsBigInt(transaction2.context)).toBe(false);

const transaction3 = generate(
cropXyzPlotAction0x496c6309 as unknown as Transaction,
Expand Down
14 changes: 2 additions & 12 deletions src/contextualizers/protocol/cropXyz/plotAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,14 @@ export function generate(transaction: Transaction): Transaction {
category: 'PROTOCOL_1',
en: {
title: `CropXYZ`,
default: '[[player]][[clearedHarvest]][[crop]]',
default: '[[player]][[clearedHarvest]]',
},
},
variables: {
player: {
type: 'address',
value: player,
},
crop: {
type: AssetType.ERC20,
token: erc20Payments[0].contract,
value: erc20Payments[0].value,
},
clearedHarvest: {
type: 'contextAction',
value: CropXyzContextActionEnum.CLEARED_HARVEST,
Expand All @@ -140,19 +135,14 @@ export function generate(transaction: Transaction): Transaction {
category: 'PROTOCOL_1',
en: {
title: `CropXYZ`,
default: '[[player]][[clearedHarvest]][[crop]]',
default: '[[player]][[clearedHarvest]]',
},
},
variables: {
player: {
type: 'address',
value: player,
},
crop: {
type: AssetType.ERC20,
token: erc20Payments[0].contract,
value: erc20Payments[0].value,
},
clearedHarvest: {
type: 'contextAction',
value: CropXyzContextActionEnum.CLEARED_HARVEST,
Expand Down

0 comments on commit a2413ca

Please sign in to comment.