mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-20 17:54:41 +00:00
show encrypted seed only when passphrase is not empty
This commit is contained in:
parent
779b35f642
commit
38006b6380
2 changed files with 5 additions and 3 deletions
|
@ -43,7 +43,8 @@ String getSeed() {
|
||||||
final lang = PolyseedLang.getByPhrase(cakepassphrase);
|
final lang = PolyseedLang.getByPhrase(cakepassphrase);
|
||||||
final coin = PolyseedCoin.POLYSEED_MONERO;
|
final coin = PolyseedCoin.POLYSEED_MONERO;
|
||||||
final ps = Polyseed.decode(cakepolyseed, lang, coin);
|
final ps = Polyseed.decode(cakepolyseed, lang, coin);
|
||||||
if (ps.isEncrypted) return ps.encode(lang, coin);
|
final passphrase = getPassphrase();
|
||||||
|
if (ps.isEncrypted || passphrase == "") return ps.encode(lang, coin);
|
||||||
ps.crypt(getPassphrase());
|
ps.crypt(getPassphrase());
|
||||||
return ps.encode(lang, coin);
|
return ps.encode(lang, coin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,9 @@ String getSeed() {
|
||||||
final lang = PolyseedLang.getByPhrase(cakepassphrase);
|
final lang = PolyseedLang.getByPhrase(cakepassphrase);
|
||||||
final coin = PolyseedCoin.POLYSEED_MONERO;
|
final coin = PolyseedCoin.POLYSEED_MONERO;
|
||||||
final ps = Polyseed.decode(cakepolyseed, lang, coin);
|
final ps = Polyseed.decode(cakepolyseed, lang, coin);
|
||||||
if (ps.isEncrypted) return ps.encode(lang, coin);
|
final passphrase = getPassphrase();
|
||||||
ps.crypt(getPassphrase());
|
if (ps.isEncrypted || passphrase == "") return ps.encode(lang, coin);
|
||||||
|
ps.crypt(passphrase);
|
||||||
return ps.encode(lang, coin);
|
return ps.encode(lang, coin);
|
||||||
}
|
}
|
||||||
return cakepolyseed;
|
return cakepolyseed;
|
||||||
|
|
Loading…
Reference in a new issue