@@ -137,6 +137,7 @@ int32_t CreateNewAccount(uint8_t accountIndex, const uint8_t *entropy, uint8_t e
137
137
ret = SaveCurrentAccountInfo ();
138
138
CHECK_ERRCODE_RETURN_INT (ret );
139
139
ret = AccountPublicInfoSwitch (g_currentAccountIndex , password , true);
140
+ CalculateZcashUFVK (accountIndex , password );
140
141
CHECK_ERRCODE_RETURN_INT (ret );
141
142
return ret ;
142
143
}
@@ -235,6 +236,7 @@ int32_t VerifyPasswordAndLogin(uint8_t *accountIndex, const char *password)
235
236
} else {
236
237
printf ("passphrase not exist, info switch\r\n" );
237
238
ret = AccountPublicInfoSwitch (g_currentAccountIndex , password , false);
239
+ CalculateZcashUFVK (g_currentAccountIndex , password );
238
240
}
239
241
} else {
240
242
g_publicInfo .loginPasswordErrorCount ++ ;
@@ -589,6 +591,11 @@ int32_t GetZcashUFVK(uint8_t accountIndex, char* outUFVK, uint8_t* outSFP) {
589
591
int32_t CalculateZcashUFVK (uint8_t accountIndex , const char * password ) {
590
592
ASSERT (accountIndex <= 2 );
591
593
594
+ if (GetMnemonicType () == MNEMONIC_TYPE_SLIP39 || GetMnemonicType () == MNEMONIC_TYPE_TON )
595
+ {
596
+ return SUCCESS_CODE ;
597
+ }
598
+
592
599
uint8_t seed [SEED_LEN ];
593
600
int len = GetMnemonicType () == MNEMONIC_TYPE_BIP39 ? sizeof (seed ) : GetCurrentAccountEntropyLen ();
594
601
int32_t ret = GetAccountSeed (accountIndex , & seed , password );
0 commit comments