Browse Source
Improve closing Cfd message in the taker UI
- Present the timestamp in human-readable format instead of Unix time,
- use lowercase action name
release/0.3.1
Mariusz Klochowicz
3 years ago
No known key found for this signature in database
GPG Key ID: 470C865699C8D4D
1 changed files with
5 additions and
2 deletions
-
taker-frontend/src/components/CloseButton.tsx
|
|
@ -13,6 +13,7 @@ import { |
|
|
|
} from "@chakra-ui/react"; |
|
|
|
import * as React from "react"; |
|
|
|
import { Cfd, StateGroupKey, StateKey } from "../types"; |
|
|
|
import Timestamp from "./Timestamp"; |
|
|
|
|
|
|
|
interface Props { |
|
|
|
cfd: Cfd; |
|
|
@ -44,8 +45,10 @@ export default function CloseButton({ cfd, request, status, action }: Props) { |
|
|
|
<PopoverCloseButton /> |
|
|
|
<PopoverBody> |
|
|
|
<Text> |
|
|
|
This will {action} your position with the counterparty. The exchange rate at {cfd |
|
|
|
.expiry_timestamp} |
|
|
|
This will {action.toLowerCase()} your position with the counterparty. The exchange rate at |
|
|
|
</Text> |
|
|
|
<Timestamp timestamp={cfd.expiry_timestamp} /> |
|
|
|
<Text> |
|
|
|
will determine your profit/losses. It is likely that the rate will change until then. |
|
|
|
</Text> |
|
|
|
</PopoverBody> |
|
|
|