Skip to content

Commit

Permalink
Support for partially active mex pairs (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghel authored Aug 8, 2023
1 parent aa6a1b9 commit 93920f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/endpoints/mex/entities/mex.pair.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum MexPairState {
active = 'active',
inactive = 'inactive',
paused = 'paused',
partial = 'partial',
}

registerEnumType(MexPairState, {
Expand All @@ -19,5 +20,8 @@ registerEnumType(MexPairState, {
paused: {
description: 'Pause state.',
},
partial: {
description: 'Partial state.',
},
},
});
2 changes: 2 additions & 0 deletions src/endpoints/mex/mex.pair.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ export class MexPairService {
return MexPairState.inactive;
case 'ActiveNoSwaps':
return MexPairState.paused;
case 'PartialActive':
return MexPairState.partial;
default:
throw new Error(`Unsupported pair state '${state}'`);
}
Expand Down

0 comments on commit 93920f0

Please sign in to comment.