mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-18 01:54:29 -05:00
wip: WithdrawDialog migrated to Tauri IPC
This commit is contained in:
parent
47821cbe79
commit
3d16ff6d5c
118 changed files with 1779 additions and 1868 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { useEffect } from 'react';
|
||||
import { TextField } from '@material-ui/core';
|
||||
import { TextFieldProps } from '@material-ui/core/TextField/TextField';
|
||||
import { isBtcAddressValid } from 'utils/conversionUtils';
|
||||
import { isTestnet } from 'store/config';
|
||||
import { useEffect } from "react";
|
||||
import { TextField } from "@material-ui/core";
|
||||
import { TextFieldProps } from "@material-ui/core/TextField/TextField";
|
||||
import { isBtcAddressValid } from "utils/conversionUtils";
|
||||
import { isTestnet } from "store/config";
|
||||
|
||||
export default function BitcoinAddressTextField({
|
||||
address,
|
||||
|
|
@ -16,11 +16,11 @@ export default function BitcoinAddressTextField({
|
|||
onAddressValidityChange: (valid: boolean) => void;
|
||||
helperText: string;
|
||||
} & TextFieldProps) {
|
||||
const placeholder = isTestnet() ? 'tb1q4aelwalu...' : 'bc18ociqZ9mZ...';
|
||||
const placeholder = isTestnet() ? "tb1q4aelwalu..." : "bc18ociqZ9mZ...";
|
||||
const errorText = isBtcAddressValid(address, isTestnet())
|
||||
? null
|
||||
: `Only bech32 addresses are supported. They begin with "${
|
||||
isTestnet() ? 'tb1' : 'bc1'
|
||||
isTestnet() ? "tb1" : "bc1"
|
||||
}"`;
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { useEffect } from 'react';
|
||||
import { TextField } from '@material-ui/core';
|
||||
import { TextFieldProps } from '@material-ui/core/TextField/TextField';
|
||||
import { isXmrAddressValid } from 'utils/conversionUtils';
|
||||
import { isTestnet } from 'store/config';
|
||||
import { useEffect } from "react";
|
||||
import { TextField } from "@material-ui/core";
|
||||
import { TextFieldProps } from "@material-ui/core/TextField/TextField";
|
||||
import { isXmrAddressValid } from "utils/conversionUtils";
|
||||
import { isTestnet } from "store/config";
|
||||
|
||||
export default function MoneroAddressTextField({
|
||||
address,
|
||||
|
|
@ -16,10 +16,10 @@ export default function MoneroAddressTextField({
|
|||
onAddressValidityChange: (valid: boolean) => void;
|
||||
helperText: string;
|
||||
} & TextFieldProps) {
|
||||
const placeholder = isTestnet() ? '59McWTPGc745...' : '888tNkZrPN6J...';
|
||||
const placeholder = isTestnet() ? "59McWTPGc745..." : "888tNkZrPN6J...";
|
||||
const errorText = isXmrAddressValid(address, isTestnet())
|
||||
? null
|
||||
: 'Not a valid Monero address';
|
||||
: "Not a valid Monero address";
|
||||
|
||||
useEffect(() => {
|
||||
onAddressValidityChange(!errorText);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue