-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow Swap App restriction #1458
Conversation
Pull Request Test Coverage Report for Build 8845849526Details
💛 - Coveralls |
@@ -29,6 +36,13 @@ export class SwapOrderMapper { | |||
orderUid, | |||
}); | |||
|
|||
if ( | |||
this.restrictApps && | |||
!this.allowedApps.has(order.fullAppData['appCode']) |
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 think it would be good to add a comment with a link to the CoW docs here. What do you think?
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.
Maybe in the Config itself what do you think?
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.
Either is a good idea for future reference.
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.
Added in 37f640f
Summary
Adds the ability to restrict the decoding functionality to specific Swap applications. Swap applications can be identified with Metadata that is added to each order by the respective apps. The property which contains this metadata is
fullAppData
– https://explorer.cow.fi/appdata?tab=encodeChanges
SWAPS_RESTRICT_APPS
– this configuration controls if the App restriction should be enabled or disabled.SWAPS_ALLOWED_APPS
– this configuration contains the comma separated collection of Swap apps which are allowed to be decoded. This configuration only has an effect ifSWAPS_RESTRICT_APPS
is set totrue
.