mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-14 04:31:01 +00:00
Adjust password checks for v3 (#349)
This commit is contained in:
@@ -15,7 +15,6 @@ import addresses from './observable/addresses';
|
|||||||
import contracts from './observable/contracts';
|
import contracts from './observable/contracts';
|
||||||
import env from './observable/development';
|
import env from './observable/development';
|
||||||
import BrowserStore from './stores/Browser'; // direct import (skip index with all)
|
import BrowserStore from './stores/Browser'; // direct import (skip index with all)
|
||||||
import { MAX_PASS_LEN } from './defaults';
|
|
||||||
|
|
||||||
export default class Base {
|
export default class Base {
|
||||||
#accounts: AddressSubject;
|
#accounts: AddressSubject;
|
||||||
@@ -91,7 +90,7 @@ export default class Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public isPassValid (password: string): boolean {
|
public isPassValid (password: string): boolean {
|
||||||
return password.length > 0 && password.length <= MAX_PASS_LEN;
|
return password.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setSS58Format (ss58Format?: Prefix): void {
|
public setSS58Format (ss58Format?: Prefix): void {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { decodeAddress } from '@polkadot/keyring';
|
|||||||
const ACCOUNT_PREFIX = 'account:';
|
const ACCOUNT_PREFIX = 'account:';
|
||||||
const ADDRESS_PREFIX = 'address:';
|
const ADDRESS_PREFIX = 'address:';
|
||||||
const CONTRACT_PREFIX = 'contract:';
|
const CONTRACT_PREFIX = 'contract:';
|
||||||
const MAX_PASS_LEN = 32;
|
|
||||||
|
|
||||||
function toHex (address: string): string {
|
function toHex (address: string): string {
|
||||||
return u8aToHex(
|
return u8aToHex(
|
||||||
@@ -38,6 +37,5 @@ export {
|
|||||||
addressKey,
|
addressKey,
|
||||||
addressRegex,
|
addressRegex,
|
||||||
contractKey,
|
contractKey,
|
||||||
contractRegex,
|
contractRegex
|
||||||
MAX_PASS_LEN
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user