feat(trading): use camel case marketId in updateMarginMode tx

This commit is contained in:
Bartłomiej Głownia 2024-01-25 15:09:09 +01:00
parent 0bd13a5f7b
commit 4ef789e00a
No known key found for this signature in database
GPG Key ID: A622E438A7075295
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ const CrossMarginModeDialog = ({
onClick={() => {
create({
updateMarginMode: {
market_id: marketId,
marketId,
mode: MarginMode.MARGIN_MODE_CROSS_MARGIN,
},
});
@ -131,7 +131,7 @@ const IsolatedMarginModeDialog = ({
onSubmit={() => {
create({
updateMarginMode: {
market_id: marketId,
marketId,
mode: MarginMode.MARGIN_MODE_ISOLATED_MARGIN,
marginFactor: `${1 / leverage}`,
},

View File

@ -456,7 +456,7 @@ export enum MarginMode {
MARGIN_MODE_ISOLATED_MARGIN,
}
export interface UpdateMarginMode {
market_id: string;
marketId: string;
mode: MarginMode;
marginFactor?: string;
}

View File

@ -453,7 +453,7 @@ const CancelOrderDetails = ({
const MarginModeDetails = ({ data }: { data: UpdateMarginMode }) => {
const t = useT();
const { data: markets } = useMarketsMapProvider();
const marketId = data.market_id;
const { marketId } = data;
const market = marketId && markets?.[marketId];
if (!market) {
return null;