Skip to content

Commit

Permalink
add afflaiteReferredMakerRebates field to response (#2473)
Browse files Browse the repository at this point in the history
(cherry picked from commit 264cb06)
  • Loading branch information
jerryfan01234 authored and mergify[bot] committed Oct 4, 2024
1 parent 939cb56 commit e3e9b5f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
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

0 comments on commit e3e9b5f

Please sign in to comment.