mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-12 03:35:06 -04:00
feat(gui): Clickable addresses to copy to clipboard (#38)
This commit is contained in:
parent
1b1fe0add5
commit
ff1ded55ba
14 changed files with 405 additions and 37 deletions
|
@ -61,7 +61,7 @@ export function SwapCancelRefundButton({
|
|||
export default function HistoryRowActions(swap: GetSwapInfoResponse) {
|
||||
if (swap.state_name === BobStateName.XmrRedeemed) {
|
||||
return (
|
||||
<Tooltip title="The swap is completed because you have redeemed the XMR">
|
||||
<Tooltip title="This swap is completed. You have redeemed the Monero.">
|
||||
<DoneIcon style={{ color: green[500] }} />
|
||||
</Tooltip>
|
||||
);
|
||||
|
@ -69,7 +69,7 @@ export default function HistoryRowActions(swap: GetSwapInfoResponse) {
|
|||
|
||||
if (swap.state_name === BobStateName.BtcRefunded) {
|
||||
return (
|
||||
<Tooltip title="The swap is completed because your BTC have been refunded">
|
||||
<Tooltip title="This swap is completed. Your Bitcoin has been refunded.">
|
||||
<DoneIcon style={{ color: green[500] }} />
|
||||
</Tooltip>
|
||||
);
|
||||
|
@ -79,7 +79,7 @@ export default function HistoryRowActions(swap: GetSwapInfoResponse) {
|
|||
// See this PR: https://github.com/UnstoppableSwap/unstoppableswap-gui/pull/212
|
||||
if (swap.state_name === BobStateName.BtcPunished) {
|
||||
return (
|
||||
<Tooltip title="The swap is completed because you have been punished">
|
||||
<Tooltip title="This swap is completed. You have been punished.">
|
||||
<ErrorIcon style={{ color: red[500] }} />
|
||||
</Tooltip>
|
||||
);
|
||||
|
|
|
@ -8,7 +8,10 @@ import {
|
|||
TableContainer,
|
||||
TableRow,
|
||||
} from "@material-ui/core";
|
||||
import { OpenInNew } from "@material-ui/icons";
|
||||
import { GetSwapInfoResponse } from "models/tauriModel";
|
||||
import CopyableMonospaceTextBox from "renderer/components/other/CopyableAddress";
|
||||
import MonospaceTextBox from "renderer/components/other/InlineCode";
|
||||
import {
|
||||
MoneroBitcoinExchangeRate,
|
||||
PiconeroAmount,
|
||||
|
@ -85,7 +88,11 @@ export default function HistoryRowExpanded({
|
|||
<TableRow>
|
||||
<TableCell>Provider Address</TableCell>
|
||||
<TableCell>
|
||||
<Box>{swap.seller.addresses.join(", ")}</Box>
|
||||
<Box>
|
||||
{swap.seller.addresses.map((addr) => (
|
||||
<CopyableMonospaceTextBox key={addr} address={addr} />
|
||||
))}
|
||||
</Box>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
|
@ -95,7 +102,10 @@ export default function HistoryRowExpanded({
|
|||
href={getBitcoinTxExplorerUrl(swap.tx_lock_id, isTestnet())}
|
||||
target="_blank"
|
||||
>
|
||||
{swap.tx_lock_id}
|
||||
<MonospaceTextBox
|
||||
content={swap.tx_lock_id}
|
||||
endIcon={<OpenInNew />}
|
||||
/>
|
||||
</Link>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue