mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-03 12:24:19 +01:00
Verify seed phrase (#1700)
* add confirm passphrase field and show/hide passphrase feature * change error message allow force appending translation to overwrite * minor fix for showing frozen balance correctly [skip ci] * remove debug prints [skip ci]
This commit is contained in:
@@ -151,34 +151,24 @@ abstract class HomeSettingsViewModelBase with Store {
|
||||
|
||||
bool isEthereum = _balanceViewModel.wallet.type == WalletType.ethereum;
|
||||
|
||||
print('An extra log for now');
|
||||
|
||||
bool isPotentialScamViaMoralis = await _isPotentialScamTokenViaMoralis(
|
||||
contractAddress,
|
||||
isEthereum ? 'eth' : 'polygon',
|
||||
);
|
||||
|
||||
print('Is Potential Scam from Moralis: $isPotentialScamViaMoralis');
|
||||
|
||||
bool isPotentialScamViaExplorers = await _isPotentialScamTokenViaExplorers(
|
||||
contractAddress,
|
||||
isEthereum: isEthereum,
|
||||
);
|
||||
|
||||
print('Is Potential Scam from Explorers: $isPotentialScamViaExplorers');
|
||||
|
||||
bool isUnverifiedContract = await _isContractUnverified(
|
||||
contractAddress,
|
||||
isEthereum: isEthereum,
|
||||
);
|
||||
|
||||
print('Is Unverified Contract: $isUnverifiedContract');
|
||||
|
||||
final showWarningForContractAddress =
|
||||
isPotentialScamViaMoralis || isUnverifiedContract || isPotentialScamViaExplorers;
|
||||
|
||||
print('Show Warning: $showWarningForContractAddress');
|
||||
|
||||
return showWarningForContractAddress;
|
||||
} finally {
|
||||
isValidatingContractAddress = false;
|
||||
@@ -272,8 +262,8 @@ abstract class HomeSettingsViewModelBase with Store {
|
||||
final decodedResponse = jsonDecode(response.body) as Map<String, dynamic>;
|
||||
|
||||
if (decodedResponse['status'] != '1') {
|
||||
print('${response.body}\n');
|
||||
print('${decodedResponse['result']}\n');
|
||||
log('${response.body}\n');
|
||||
log('${decodedResponse['result']}\n');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user