mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-27 02:02:10 +01:00
mainnet validation
This commit is contained in:
parent
c7399b5b36
commit
0ba5a50640
@ -1,11 +1,11 @@
|
||||
import { validate } from 'bitcoin-address-validation';
|
||||
import { Network, validate } from 'bitcoin-address-validation';
|
||||
import { registerDecorator, ValidationOptions, ValidatorConstraint, ValidatorConstraintInterface } from 'class-validator';
|
||||
|
||||
@ValidatorConstraint({ name: 'bitcoinAddress', async: false })
|
||||
export class BitcoinAddress implements ValidatorConstraintInterface {
|
||||
validate(value: string): boolean {
|
||||
// Implement your custom validation logic here
|
||||
return validate(value);
|
||||
return validate(value, Network.mainnet);
|
||||
}
|
||||
|
||||
defaultMessage(): string {
|
||||
|
Loading…
x
Reference in New Issue
Block a user