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

add afflaiteReferredMakerRebates field to response (backport #2473) #2474

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -380,5 +380,6 @@ function affiliateInfoCreateToResponseObject(
affiliateReferredTotalVolume: Number(info.referredTotalVolume),
affiliateReferredMakerFees: Number(info.totalReferredMakerFees),
affiliateReferredTakerFees: Number(info.totalReferredTakerFees),
affiliateReferredMakerRebates: Number(info.totalReferredMakerRebates),
};
}
10 changes: 7 additions & 3 deletions indexer/services/comlink/public/api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,8 @@ fetch(`${baseURL}/affiliates/snapshot`,
"affiliateReferredNetProtocolEarnings": 0.1,
"affiliateReferredTotalVolume": 0.1,
"affiliateReferredMakerFees": 0.1,
"affiliateReferredTakerFees": 0.1
"affiliateReferredTakerFees": 0.1,
"affiliateReferredMakerRebates": 0.1
}
],
"total": 0.1,
Expand Down Expand Up @@ -4248,7 +4249,8 @@ This operation does not require authentication
"affiliateReferredNetProtocolEarnings": 0.1,
"affiliateReferredTotalVolume": 0.1,
"affiliateReferredMakerFees": 0.1,
"affiliateReferredTakerFees": 0.1
"affiliateReferredTakerFees": 0.1,
"affiliateReferredMakerRebates": 0.1
}

```
Expand All @@ -4267,6 +4269,7 @@ This operation does not require authentication
|affiliateReferredTotalVolume|number(double)|true|none|none|
|affiliateReferredMakerFees|number(double)|true|none|none|
|affiliateReferredTakerFees|number(double)|true|none|none|
|affiliateReferredMakerRebates|number(double)|true|none|none|

## AffiliateSnapshotResponse

Expand All @@ -4288,7 +4291,8 @@ This operation does not require authentication
"affiliateReferredNetProtocolEarnings": 0.1,
"affiliateReferredTotalVolume": 0.1,
"affiliateReferredMakerFees": 0.1,
"affiliateReferredTakerFees": 0.1
"affiliateReferredTakerFees": 0.1,
"affiliateReferredMakerRebates": 0.1
}
],
"total": 0.1,
Expand Down
7 changes: 6 additions & 1 deletion indexer/services/comlink/public/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@
"affiliateReferredTakerFees": {
"type": "number",
"format": "double"
},
"affiliateReferredMakerRebates": {
"type": "number",
"format": "double"
}
},
"required": [
Expand All @@ -323,7 +327,8 @@
"affiliateReferredNetProtocolEarnings",
"affiliateReferredTotalVolume",
"affiliateReferredMakerFees",
"affiliateReferredTakerFees"
"affiliateReferredTakerFees",
"affiliateReferredMakerRebates"
],
"type": "object",
"additionalProperties": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ class AffiliatesController extends Controller {
affiliateReferredTotalVolume: Number(info.referredTotalVolume),
affiliateReferredMakerFees: Number(info.totalReferredMakerFees),
affiliateReferredTakerFees: Number(info.totalReferredTakerFees),
affiliateReferredMakerRebates: Number(info.totalReferredMakerRebates),
}));

const response: AffiliateSnapshotResponse = {
Expand Down
1 change: 1 addition & 0 deletions indexer/services/comlink/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ export interface AffiliateSnapshotResponseObject {
affiliateReferredTotalVolume: number,
affiliateReferredMakerFees: number,
affiliateReferredTakerFees: number,
affiliateReferredMakerRebates: number,
}

export interface AffiliateTotalVolumeResponse {
Expand Down
Loading