minor edits to aesthetics and functionality
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// walletGenerator.js
|
||||
|
||||
|
||||
import bip39 from 'bip39';
|
||||
import HDKey from 'hdkey';
|
||||
import { publicToAddress } from 'ethereumjs-util';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user