Browse Source

Merge #246

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
parent
commit
9bef47cb83
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      daemon/src/model/cfd.rs
  2. 4
      frontend/src/MakerApp.tsx
  3. 4
      frontend/src/TakerApp.tsx

2
daemon/src/model/cfd.rs

@ -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)?;

4
frontend/src/MakerApp.tsx

@ -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}>

4
frontend/src/TakerApp.tsx

@ -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}>

Loading…
Cancel
Save