-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: check for accounting approval modules #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a single comment, then is good for me 🫡
const key = (isApproved ? "approved" : "notApproved") as keyof typeof summary; | ||
|
||
summary[key] = { ...summary[key], [moduleName]: moduleAddress }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is as keyof typeof summary
needed? isn't TS intelligent enough to narrow the type?
also doing smth like: summary[key][moduleName] = moduleAddress;
seems cleaner to me, do we need to create a new object with the spread operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
apps/agent/src/index.ts
Outdated
import { ProtocolProvider } from "@ebo-agent/automated-dispute/dist/providers/protocolProvider.js"; | ||
import { AccountingModules } from "@ebo-agent/automated-dispute/dist/types/prophet.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dist
is pointing to the code that has been built ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥴
notApproved: {}, | ||
}; | ||
|
||
for (const [moduleName, moduleAddress] of Object.entries(this.accountingModules)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const [moduleName, moduleAddress] of Object.entries(this.accountingModules)) { | |
for (const key in this.accountingModules) { |
You can do it this way also, just to let you know, not requesting any changes here 🤣
@@ -3,11 +3,22 @@ import { BlockNumberService } from "@ebo-agent/blocknumber"; | |||
import { Caip2ChainId } from "@ebo-agent/blocknumber/dist/types.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this isn't in your PR but we should clean up these dist imports eventually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally! Already did it in #49 's latest commit
🤖 Linear
Closes GRT-163
Description