From eaa7f15090641e71969a580a90a082e23694cb4a Mon Sep 17 00:00:00 2001 From: Kostiantyn Smyrnov Date: Tue, 5 Jul 2022 10:08:08 +0200 Subject: [PATCH] feat: added env IPFS_API_HOST --- src/api/ipfs.ts | 2 +- src/api/keysImport.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/ipfs.ts b/src/api/ipfs.ts index e3ef6d5..4c4e350 100644 --- a/src/api/ipfs.ts +++ b/src/api/ipfs.ts @@ -8,7 +8,7 @@ export interface IpfsApiAddResponse { Size: string; } -export const defaultIpfsApiHost = +export const defaultIpfsApiHost = process.env.IPFS_API_HOST || 'https://staging-ipfs.marketplace.windingtree.com'; // Adds and pin a file to IPFS diff --git a/src/api/keysImport.ts b/src/api/keysImport.ts index cff5053..6c5ec99 100644 --- a/src/api/keysImport.ts +++ b/src/api/keysImport.ts @@ -50,7 +50,7 @@ export const importEthereum = async ( name: 'password', message: 'Please provide a password', validate: value => - /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.exec(value) + /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])/.exec(value) ? true : 'Password must consist of a minimum of eight characters, at least one letter and one number' }