Browse Source
246: Fixed leverage of 2 instead of 5 r=da-kami a=da-kami
Co-authored-by: Daniel Karzel <daniel@comit.network>
compile-for-aarch64
bors[bot]
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
5 deletions
-
daemon/src/model/cfd.rs
-
frontend/src/MakerApp.tsx
-
frontend/src/TakerApp.tsx
|
|
@ -108,7 +108,7 @@ impl Order { |
|
|
|
origin: Origin, |
|
|
|
oracle_event_id: OracleEventId, |
|
|
|
) -> Result<Self> { |
|
|
|
let leverage = Leverage(5); |
|
|
|
let leverage = Leverage(2); |
|
|
|
let maintenance_margin_rate = dec!(0.005); |
|
|
|
let liquidation_price = |
|
|
|
calculate_liquidation_price(&leverage, &price, &maintenance_margin_rate)?; |
|
|
|
|
|
@ -132,8 +132,8 @@ export default function App() { |
|
|
|
<Text>Leverage:</Text> |
|
|
|
<HStack spacing={5}> |
|
|
|
<Button disabled={true}>x1</Button> |
|
|
|
<Button disabled={true}>x2</Button> |
|
|
|
<Button colorScheme="blue" variant="solid">x{5}</Button> |
|
|
|
<Button colorScheme="blue" variant="solid">x{2}</Button> |
|
|
|
<Button disabled={true}>x5</Button> |
|
|
|
</HStack> |
|
|
|
|
|
|
|
<GridItem colSpan={2}> |
|
|
|
|
|
@ -154,8 +154,8 @@ export default function App() { |
|
|
|
<Text>Leverage:</Text> |
|
|
|
<HStack spacing={5}> |
|
|
|
<Button disabled={true}>x1</Button> |
|
|
|
<Button disabled={true}>x2</Button> |
|
|
|
<Button colorScheme="blue" variant="solid">x{order?.leverage}</Button> |
|
|
|
<Button colorScheme="blue" variant="solid">x{order ? order.leverage : 2}</Button> |
|
|
|
<Button disabled={true}>x5</Button> |
|
|
|
</HStack> |
|
|
|
|
|
|
|
<GridItem colSpan={2}> |
|
|
|