mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
23 lines
578 B
JavaScript
23 lines
578 B
JavaScript
// @flow
|
|
/* eslint-disable prefer-default-export */
|
|
import { regexAddress } from 'lbry-redux';
|
|
|
|
type DraftTxValues = {
|
|
address: string,
|
|
// amount: number
|
|
};
|
|
|
|
export const validateSendTx = (formValues: DraftTxValues) => {
|
|
const { address } = formValues;
|
|
const errors = {};
|
|
|
|
// All we need to check is if the address is valid
|
|
// If values are missing, users wont' be able to submit the form
|
|
// if (address && !regexAddress.test(address)) {
|
|
// errors.address = __('Not a valid LBRY address');
|
|
// }
|
|
|
|
return errors;
|
|
};
|
|
|
|
/* eslint-enable prefer-default-export */
|