-
Notifications
You must be signed in to change notification settings - Fork 72
feat: Add validation for inputs currency and currencyToken. #683
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
base: main
Are you sure you want to change the base?
Conversation
| "0x1514000000000000000000000000000000000000" as Address, // WIP | ||
| ], | ||
| } as const satisfies Record<SupportedChainIds, readonly Address[]>; | ||
|
|
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.
Could you try using a function instead object? Can you wrap the error into the function instead layout many places?
| }); | ||
|
|
||
| describe("Test groupClient.collectRoyalties", () => { | ||
| describe("TSSDK-135(Add validation for inputs currency and currencyToken.) Test groupClient.collectRoyalties", () => { |
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.
The same as the above one.
| expect(oov3Contract).to.equal(mockAddress); | ||
| }); | ||
|
|
||
| describe("TSSDK-135(Add validation for inputs currency and currencyToken.) getMinimumBond", () => { |
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.
The same as the above one.
| }); | ||
|
|
||
| describe("commercialUse", () => { | ||
| describe("TSSDK-135(Add validation for inputs currency and currencyToken.) commercialUse", () => { |
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.
Please check the similar issues.
| export const mockAddress = "0x73fcb515cee99e4991465ef586cfe2b072ebb513"; | ||
| // Use addresses that are whitelisted in `allowedCurrenciesByChain` for unit tests that exercise currency checks. | ||
| export const mockERC20 = "0xF2104833d386a2734a4eB3B8ad6FC6812F29E38E"; | ||
| export const mockAddress = "0x1514000000000000000000000000000000000000"; |
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.
You can directly get WIP from "./constants/common"
| "eslint-config-turbo": "^1.13.4", | ||
| "eslint-import-resolver-typescript": "^4.3.4", | ||
| "eslint-plugin-import": "^2.31.0", | ||
| "eslint-plugin-turbo": "^1.13.4", |
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.
Please focus on the ticket feature. We don't need it.
Description
This pr is adding validation for inputs currency and currencyToken., includes:
Aeneid: Input parameterscurrency/currencyTokenacceptsWIPorMERC20.Mainnet: Input parameterscurrency/currencyTokenacceptsWIP.WIP address:
0x1514000000000000000000000000000000000000MERC20 address:
0xF2104833d386a2734a4eB3B8ad6FC6812F29E38ETest Plan
Add unit tests for the modified APIs.