feat(dubp): support member wallet from legacy salt+password

This commit is contained in:
librelois 2021-02-21 18:04:17 +01:00
parent 706799afcd
commit e3529c4aba
2 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,11 @@ pub(crate) fn compute_secret_code_len(
}
SecretCodeType::Letters => {
if member_wallet {
Ok(10)
if log_n >= 15 {
Ok(7)
} else {
Ok(8)
}
} else if log_n >= 15 {
Ok(5)
} else {

View File

@ -122,6 +122,7 @@ class DubpRust {
String salt,
String password,
SecretCodeType secretCodeType = SecretCodeType.letters,
bool isMember = false,
}) async {
int ram = SysInfo.getTotalPhysicalMemory();
print('ram=$ram');
@ -134,7 +135,7 @@ class DubpRust {
Utf8.toUtf8(currency),
Utf8.toUtf8(salt),
Utf8.toUtf8(password),
0,
isMember ? 1 : 0,
secretCodeType.index,
ram,
);