Adjust password checks for v3 (#349)

This commit is contained in:
Jaco Greeff
2020-07-21 22:29:50 +02:00
committed by GitHub
parent 0138ac3e4a
commit a3ab735c4e
2 changed files with 2 additions and 5 deletions
+1 -2
View File
@@ -15,7 +15,6 @@ import addresses from './observable/addresses';
import contracts from './observable/contracts';
import env from './observable/development';
import BrowserStore from './stores/Browser'; // direct import (skip index with all)
import { MAX_PASS_LEN } from './defaults';
export default class Base {
#accounts: AddressSubject;
@@ -91,7 +90,7 @@ export default class Base {
}
public isPassValid (password: string): boolean {
return password.length > 0 && password.length <= MAX_PASS_LEN;
return password.length > 0;
}
public setSS58Format (ss58Format?: Prefix): void {
+1 -3
View File
@@ -8,7 +8,6 @@ import { decodeAddress } from '@polkadot/keyring';
const ACCOUNT_PREFIX = 'account:';
const ADDRESS_PREFIX = 'address:';
const CONTRACT_PREFIX = 'contract:';
const MAX_PASS_LEN = 32;
function toHex (address: string): string {
return u8aToHex(
@@ -38,6 +37,5 @@ export {
addressKey,
addressRegex,
contractKey,
contractRegex,
MAX_PASS_LEN
contractRegex
};