minor edits to aesthetics and functionality

This commit is contained in:
NW
2025-01-08 18:26:50 +00:00
parent 5ae148a2ba
commit 18647091cf
4 changed files with 151 additions and 60 deletions

View File

@@ -1,3 +1,6 @@
// walletGenerator.js
import bip39 from 'bip39';
import HDKey from 'hdkey';
import { publicToAddress } from 'ethereumjs-util';

View File

@@ -76,7 +76,17 @@ export default class WalletUtils {
}
static getBaseWalletType(walletType) {
if (walletType.includes('ERC-20')) return 'ETH';
// Убираем суффикс ERC-20, если он есть
if (walletType.includes('ERC-20')) {
return 'ETH';
}
// Убираем суффикс с таймштампом (например, USDT_1735846098129 -> USDT)
if (walletType.includes('_')) {
return walletType.split('_')[0];
}
// Возвращаем исходный тип, если это не ERC-20 и не архивный кошелек
return walletType;
}