Skip to content

Commit

Permalink
refactor: rename smartQuote to smartSlippage
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Sep 5, 2024
1 parent 46d7d8c commit ce3e369
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/generatedTypes/v1.2.0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export type UTMKeywordTerm = string;
*/
export type SlippageBips = number;
/**
* Whether the given slippageBips used is originated from a Smart quote suggestion
* Whether the given slippageBips used is originated from a Smart slippage suggestion
*/
export type SmartQuote = boolean;
export type SmartSlippage = boolean;
/**
* Indicator of the order class.
*/
Expand Down Expand Up @@ -134,7 +134,7 @@ export interface UTMCodes {
}
export interface Quote {
slippageBips: SlippageBips;
smartQuote?: SmartQuote;
smartSlippage?: SmartSlippage;
}
export interface OrderClass {
orderClass: OrderClass1;
Expand Down
6 changes: 3 additions & 3 deletions src/schemas/quote/v1.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"description": "Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",
"$ref": "../definitions.json#/definitions/bps"
},
"smartQuote": {
"title": "Smart Quote",
"description": "Whether the given slippageBips used is originated from a Smart quote suggestion",
"smartSlippage": {
"title": "Smart Slippage",
"description": "Whether the given slippageBips used is originated from a Smart slippage suggestion",
"type": "boolean",
"default": false
}
Expand Down
6 changes: 3 additions & 3 deletions test/schema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ describe('Schema v1.2.0', () => {
test('With quote metadata v1.1.0', () => {
const validQuote = {
slippageBips: 5,
smartQuote: true,
smartSlippage: true,
}

const validDocument = {
Expand All @@ -977,7 +977,7 @@ describe('Schema v1.2.0', () => {
expect(validator(validDocument)).toBe(true)
})

test('With valid metadata (without smartQuote)', () => {
test('With valid metadata (without smartSlippage)', () => {
const quote = {
slippageBips: 5,
}
Expand All @@ -995,7 +995,7 @@ describe('Schema v1.2.0', () => {
test('With invalid quote metadata (invalid slippageBips)', () => {
const invalidQuote = {
slippageBips: 'invalid',
smartQuote: true,
smartSlippage: true,
}

const invalidDocument = {
Expand Down

0 comments on commit ce3e369

Please sign in to comment.