Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use issue.node_id for permit nonces #108

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const cfg: Config = {
coverageReporters: ["json", "lcov", "text", "clover", "json-summary"],
reporters: ["default", "jest-junit", "jest-md-dashboard"],
coverageDirectory: "coverage",
testTimeout: 10000,
testTimeout: 20000,
roots: ["<rootDir>", "tests"],
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@octokit/webhooks": "13.2.7",
"@sinclair/typebox": "0.32.23",
"@supabase/supabase-js": "2.42.0",
"@ubiquibot/permit-generation": "1.3.1",
"@ubiquibot/permit-generation": "1.6.0",
rndquu marked this conversation as resolved.
Show resolved Hide resolved
"@ubiquity-dao/rpc-handler": "1.3.0",
"@ubiquity-dao/ubiquibot-logger": "1.3.1",
"decimal.js": "10.4.3",
Expand Down
4 changes: 2 additions & 2 deletions src/parser/permit-generation-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface Payload {
issueUrl: string;
evmPrivateEncrypted: string;
erc20RewardToken: string;
issue: { id: number };
issue: { node_id: string };
}

export class PermitGenerationModule implements Module {
Expand All @@ -46,7 +46,7 @@ export class PermitGenerationModule implements Module {
};
const issueId = Number(payload.issueUrl.match(/[0-9]+$/)?.[0]);
payload.issue = {
id: issueId,
0x4007 marked this conversation as resolved.
Show resolved Hide resolved
node_id: program.eventPayload.issue.node_id,
};
const env = Value.Default(envConfigSchema, process.env) as EnvConfigType;
if (!Value.Check(envConfigSchema, env)) {
Expand Down
12 changes: 6 additions & 6 deletions tests/__mocks__/results/github-comment-results.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tests/__mocks__/results/output-reward-split.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions tests/__mocks__/results/output.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tests/__mocks__/results/permit-generation-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
"url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949196678"
}
],
"permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiIxMDA5ODAwMDAwMDAwMDAwMDAwMDAifSwibm9uY2UiOiIxMzk4MDc3NDQ3Njk3Njc2NDUwNDg5OTI1OTY3MjgzNzQyNDc1NDg5MTE2OTQzMTAxODM2MjUyODIwMzEyOTk2OTU5MDg4MjA4MTYxIiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiIxMDA5ODAwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweGQ5NTMwRjNmYkJFYTExYmVEMDFEQzA5RTc5MzE4ZjJmMjAyMjM3MTYiLCJzaWduYXR1cmUiOiIweDM1MTczYjc5YzA4NjY3YTU0NTljZjY1ZjA0NjQ4YjQ5MWQ4ZDQyNDcyYTE0NmUwN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670
},
Expand Down Expand Up @@ -426,7 +426,7 @@
"url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949046925"
}
],
"permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NzUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjEwODAwNTI0OTcwODY5MDEwODU1NTU2MTA2MzI5OTM1MDQ1MTQwNTQ2NDU1MDc5NDkxNzkwNzI0NjYzNjk1OTk5MTMyMjMxMTU3Nzc2NiIsImRlYWRsaW5lIjoiNTc4OTYwNDQ2MTg2NTgwOTc3MTE3ODU0OTI1MDQzNDM5NTM5MjY2MzQ5OTIzMzI4MjAyODIwMTk3Mjg3OTIwMDM5NTY1NjQ4MTk5NjcifSwidHJhbnNmZXJEZXRhaWxzIjp7InRvIjoiMHg0RDA3MDRmNDAwRDU3QmE5M2VFYTg4NzY1QzNGY0RCRDgyNmRDRmM0IiwicmVxdWVzdGVkQW1vdW50IjoiNDc1MDAwMDAwMDAwMDAwMDAwMDAifSwib3duZXIiOiIweGQ5NTMwRjNmYkJFYTExYmVEMDFEQzA5RTc5MzE4ZjJmMjAyMjM3MTYiLCJzaWduYXR1cmUiOiIweDU2N2I4YmE0ZmU2NTk2ZGM4ZDBkYmVkYzk0MmEyMWQ2Y2FjMzBhMmFiZDBjODMyODRiMGUyNGNkOGEwOTA3YmMwYjA0MGU1YmVlOGViMDhmMDVkZjU0M2JhMmUzODI5YmE4YTU0ZTQ1Y2YyNjk2NDk1MzczMDAwZTM1NmFmMzlkMWIiLCJuZXR3b3JrSWQiOjEwMH1d",
"permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQzRDc5NDRGYTg2MzQ2M2E5N2QiLCJhbW91bnQiOiI0NzUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJub25jZSI6IjU2NTUzNDk0NDU0MDk3MDE4NzcyMjE2NjE5NTI3NTk5MjE1NzUwNDQ1NjI4MjY2Njk2MjA3MzcxNjE1Mzc1NTEzMjM5NjM2MDMyMDE4IiwiZGVhZGxpbmUiOiI1Nzg5NjA0NDYxODY1ODA5NzcxMTc4NTQ5MjUwNDM0Mzk1MzkyNjYzNDk5MjMzMjgyMDI4MjAxOTcyODc5MjAwMzk1NjU2NDgxOTk2NyJ9LCJ0cmFuc2ZlckRldGFpbHMiOnsidG8iOiIweDREMDcwNGY0MDBENTdCYTkzZUVhODg3NjVDM0ZjREJEODI2ZENGYzQiLCJyZXF1ZXN0ZWRBbW91bnQiOiI0NzUwMDAwMDAwMDAwMDAwMDAwMCJ9LCJvd25lciI6IjB4ZDk1MzBGM2ZiQkVhMTFiZUQwMURDMDlFNzkzMThmMmYyMDIyMzcxNiIsInNpZ25hdHVyZSI6IjB4YTVlZDFkMTZiMDhjNjg0MTM0YmMwMjcwMjdlZTZmZDZkYzVmNzJmODM2YWJkNjdiYjI3MGRkOTk5YmIzYmM2MzQ5MjY5YWUyYTc1ZmJjMTY1NjNiNDg0Mjk3YjNiYmU5ZmE1ZGU4M2QxN2FjNzUyZWU4ODExMTllMmEwNjBjNmExYiIsIm5ldHdvcmtJZCI6MTAwfV0=",
"task": {
"multiplier": 1,
"reward": 37.5
Expand Down Expand Up @@ -638,7 +638,7 @@
"url": "https://github.com/ubiquibot/comment-incentives/pull/25#issuecomment-1949044855"
}
],
"permitUrl": "https://pay.ubq.fi?claim=W3sidHlwZSI6ImVyYzIwLXBlcm1pdCIsInBlcm1pdCI6eyJwZXJtaXR0ZWQiOnsidG9rZW4iOiIweGU5MUQxNTNFMGI0MTUxOEEyQ2U4RGQz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