mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-03 05:55:03 +01:00
refactor: rename holesky to hoodi
This commit is contained in:
committed by
Jaroslav Hrách
parent
f659d1b334
commit
0053b5b021
@@ -166,15 +166,15 @@
|
||||
{
|
||||
"blockchain_link": {
|
||||
"type": "blockbook",
|
||||
"url": ["https://holesky1.trezor.io", "https://holesky2.trezor.io"]
|
||||
"url": ["https://hoodi1.trezor.io", "https://hoodi2.trezor.io"]
|
||||
},
|
||||
"chain": "hol",
|
||||
"chain_id": 17000,
|
||||
"chain": "hod",
|
||||
"chain_id": 560048,
|
||||
"blocktime_seconds": 12,
|
||||
"is_testnet": true,
|
||||
"label": "tHOL",
|
||||
"name": "Holesky",
|
||||
"shortcut": "tHOL",
|
||||
"label": "tHOD",
|
||||
"name": "Hoodi",
|
||||
"shortcut": "tHOD",
|
||||
"slip44": 1,
|
||||
"support": {
|
||||
"T1B1": "1.11.3",
|
||||
|
||||
@@ -17,7 +17,7 @@ const select = [
|
||||
{ value: 'eth', label: 'Ethereum' },
|
||||
{ value: 'etc', label: 'Ethereum Classic' },
|
||||
{ value: 'tsep', label: 'Sepolia' },
|
||||
{ value: 'thol', label: 'Holesky' },
|
||||
{ value: 'thod', label: 'Hoodi' },
|
||||
{ value: 'sol', label: 'Solana' },
|
||||
{ value: 'dsol', label: 'Solana devnet' },
|
||||
{ value: 'ada', label: 'Cardano' },
|
||||
|
||||
@@ -2,7 +2,7 @@ export const select = [
|
||||
{ value: 'eth', label: 'Ethereum', affectedValue: `m/44'/60'/0'/0` },
|
||||
{ value: 'etc', label: 'Ethereum Classic', affectedValue: `m/44'/60'/0'/0` },
|
||||
{ value: 'tSEP', label: 'Ethereum Testnet Sepolia', affectedValue: `m/44'/1'/0'/0` },
|
||||
{ value: 'tHOL', label: 'Ethereum Testnet Holesky', affectedValue: `m/44'/1'/0'/0` },
|
||||
{ value: 'tHOD', label: 'Ethereum Testnet Hoodi', affectedValue: `m/44'/1'/0'/0` },
|
||||
{ value: 'ubq', label: 'Ubiq', affectedValue: `m/44'/108'/0'/0` },
|
||||
{ value: 'exp', label: 'Expanse', affectedValue: `m/44'/40'/0'/0` },
|
||||
{ value: 'GO', label: 'GoChain', affectedValue: `m/44'/6060'/0'/0` },
|
||||
|
||||
@@ -5,7 +5,7 @@ export const select = [
|
||||
{ value: 'eth', label: 'Ethereum', affectedValue: `m/44'/60'/0'/0/0` },
|
||||
{ value: 'etc', label: 'Ethereum Classic', affectedValue: `m/44'/61'/0'/0/0` },
|
||||
{ value: 'tsep', label: 'Sepolia', affectedValue: `m/44'/60'/0'/0/0` },
|
||||
{ value: 'thol', label: 'Holesky', affectedValue: `m/44'/60'/0'/0/0` },
|
||||
{ value: 'thod', label: 'Hoodi', affectedValue: `m/44'/60'/0'/0/0` },
|
||||
];
|
||||
|
||||
const batch = [
|
||||
|
||||
@@ -2,7 +2,7 @@ export const select = [
|
||||
{ value: 'eth', label: 'Ethereum', affectedValue: `m/44'/60'/0'/0` },
|
||||
{ value: 'etc', label: 'Ethereum Classic', affectedValue: `m/44'/60'/0'/0` },
|
||||
{ value: 'tSEP', label: 'Ethereum Testnet Sepolia', affectedValue: `m/44'/1'/0'/0` },
|
||||
{ value: 'tHOL', label: 'Ethereum Testnet Holesky', affectedValue: `m/44'/1'/0'/0` },
|
||||
{ value: 'tHOD', label: 'Ethereum Testnet Hoodi', affectedValue: `m/44'/1'/0'/0` },
|
||||
{ value: 'ubq', label: 'Ubiq', affectedValue: `m/44'/108'/0'/0` },
|
||||
{ value: 'exp', label: 'Expanse', affectedValue: `m/44'/40'/0'/0` },
|
||||
{ value: 'GO', label: 'GoChain', affectedValue: `m/44'/6060'/0'/0` },
|
||||
|
||||
@@ -158,7 +158,7 @@ export const config: Config = {
|
||||
],
|
||||
},
|
||||
{
|
||||
coin: ['eth', 'tsep', 'thol'],
|
||||
coin: ['eth', 'tsep', 'thod'],
|
||||
min: { T1B1: '1.8.0', T2T1: '2.1.0' },
|
||||
comment: ['There were protobuf backwards incompatible changes.'],
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ export const ACCOUNT_TYPES = [
|
||||
{ symbol: 'eth', type: 'ledger', path: "m/44'/60'/i'/0/0" },
|
||||
{ symbol: 'eth', type: 'legacy', path: "m/44'/60'/0'/i" },
|
||||
{ symbol: 'tsep', type: 'normal', path: "m/44'/1'/0'/0/i" },
|
||||
{ symbol: 'thol', type: 'normal', path: "m/44'/1'/0'/0/i" },
|
||||
{ symbol: 'thod', type: 'normal', path: "m/44'/1'/0'/0/i" },
|
||||
{ symbol: 'pol', type: 'normal', path: "m/44'/60'/0'/0/i" },
|
||||
{ symbol: 'pol', type: 'ledger', path: "m/44'/60'/i'/0/0" },
|
||||
{ symbol: 'bsc', type: 'normal', path: "m/44'/60'/0'/0/i" },
|
||||
|
||||
@@ -157,7 +157,7 @@ describe('utils/deviceFeaturesUtils', () => {
|
||||
sol: 'no-support',
|
||||
dsol: 'no-support',
|
||||
sys: 'update-required',
|
||||
thol: 'update-required',
|
||||
thod: 'update-required',
|
||||
tppc: 'update-required',
|
||||
trvn: 'update-required',
|
||||
tsep: 'update-required',
|
||||
@@ -190,7 +190,7 @@ describe('utils/deviceFeaturesUtils', () => {
|
||||
omni: 'no-capability',
|
||||
op: 'update-required',
|
||||
tsep: 'update-required',
|
||||
thol: 'update-required',
|
||||
thod: 'update-required',
|
||||
trvn: 'update-required',
|
||||
usdt: 'no-capability',
|
||||
sol: 'no-capability',
|
||||
@@ -226,7 +226,7 @@ describe('utils/deviceFeaturesUtils', () => {
|
||||
'pac:hrt': 'no-support',
|
||||
sol: 'no-capability',
|
||||
dsol: 'no-capability',
|
||||
thol: 'update-required',
|
||||
thod: 'update-required',
|
||||
tsep: 'update-required',
|
||||
usdt: 'no-capability',
|
||||
vtc: 'no-support',
|
||||
|
||||
@@ -27,7 +27,7 @@ export const COINS: Record<NetworkSymbol | LegacyNetworkSymbol, string> = {
|
||||
sol: require('../../images/coins/sol.svg'),
|
||||
tada: require('../../images/coins/tada.svg'),
|
||||
test: require('../../images/coins/btc_test.svg'),
|
||||
thol: require('../../images/coins/thol.svg'),
|
||||
thod: require('../../images/coins/thod.svg'),
|
||||
tsep: require('../../images/coins/tsep.svg'),
|
||||
txlm: require('../../images/coins/txlm.svg'),
|
||||
txrp: require('../../images/coins/txrp.svg'),
|
||||
|
||||
@@ -20,7 +20,7 @@ export const NETWORK_ICONS: Record<NetworkSymbol | LegacyNetworkSymbol, string>
|
||||
sol: require('../../images/networks/sol.svg'),
|
||||
tada: require('../../images/networks/tada.svg'),
|
||||
test: require('../../images/networks/btc_test.svg'),
|
||||
thol: require('../../images/networks/thol.svg'),
|
||||
thod: require('../../images/networks/thod.svg'),
|
||||
tsep: require('../../images/networks/tsep.svg'),
|
||||
txlm: require('../../images/networks/txlm.svg'),
|
||||
txrp: require('../../images/networks/txrp.svg'),
|
||||
|
||||
|
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 705 B |
@@ -147,7 +147,7 @@ test.describe('Analytics Events', { tag: ['@group=suite', '@webOnly'] }, () => {
|
||||
await settingsPage.changeTheme(Theme.Dark);
|
||||
await settingsPage.navigateTo('coins');
|
||||
await settingsPage.coins.enableNetwork('eth');
|
||||
await settingsPage.coins.enableNetwork('thol');
|
||||
await settingsPage.coins.enableNetwork('thod');
|
||||
await settingsPage.coins.disableNetwork('btc');
|
||||
await settingsPage.coins.openNetworkAdvanceSettings('eth');
|
||||
await settingsPage.coins.changeBackend('blockbook', 'https://eth.marek.pl/');
|
||||
@@ -188,7 +188,7 @@ test.describe('Analytics Events', { tag: ['@group=suite', '@webOnly'] }, () => {
|
||||
>(EventType.SuiteReady);
|
||||
expect(suiteReadyEvent).toContainSubObject({
|
||||
language: 'en-US',
|
||||
enabledNetworks: 'eth,thol',
|
||||
enabledNetworks: 'eth,thod',
|
||||
customBackends: 'eth',
|
||||
localCurrency: 'czk',
|
||||
bitcoinUnit: 'sat',
|
||||
|
||||
@@ -9,7 +9,7 @@ test.describe.skip('Ethereum staking core FW', { tag: ['@group=manual'] }, () =>
|
||||
{
|
||||
annotation: createTestAnnotation({
|
||||
testCase:
|
||||
'Verifies that a user can stake Ethereum. Holesky testnet can be used as backup',
|
||||
'Verifies that a user can stake Ethereum. Hoodi testnet can be used as backup',
|
||||
prerequisites: [
|
||||
'Seeded Trezor device with transactions with "academic" seed',
|
||||
'Connected Trezor Suite',
|
||||
@@ -46,7 +46,7 @@ test.describe.skip('Ethereum staking core FW', { tag: ['@group=manual'] }, () =>
|
||||
{
|
||||
annotation: createTestAnnotation({
|
||||
testCase:
|
||||
'Verifies that a user can unstake Ethereum. Holesky testnet can be used as backup',
|
||||
'Verifies that a user can unstake Ethereum. Hoodi testnet can be used as backup',
|
||||
prerequisites: [
|
||||
'Seeded Trezor device with transactions with "academic" seed',
|
||||
'Connected Trezor Suite',
|
||||
@@ -74,7 +74,7 @@ test.describe.skip('Ethereum staking core FW', { tag: ['@group=manual'] }, () =>
|
||||
{
|
||||
annotation: createTestAnnotation({
|
||||
testCase:
|
||||
'Verifies that a user can claim Ethereum rewards. Holesky testnet can be used as backup',
|
||||
'Verifies that a user can claim Ethereum rewards. Hoodi testnet can be used as backup',
|
||||
prerequisites: [
|
||||
'Seeded Trezor device with transactions with "academic" seed',
|
||||
'Connected Trezor Suite',
|
||||
|
||||
@@ -9,7 +9,7 @@ test.describe.skip('Ethereum staking legacy FW', { tag: ['@group=manual'] }, ()
|
||||
{
|
||||
annotation: createTestAnnotation({
|
||||
testCase:
|
||||
'Verifies that a user can stake Ethereum. Holesky testnet can be used as backup',
|
||||
'Verifies that a user can stake Ethereum. Hoodi testnet can be used as backup',
|
||||
prerequisites: [
|
||||
'Seeded Trezor device with transactions with "all" seed',
|
||||
'Connected Trezor Suite',
|
||||
@@ -46,7 +46,7 @@ test.describe.skip('Ethereum staking legacy FW', { tag: ['@group=manual'] }, ()
|
||||
{
|
||||
annotation: createTestAnnotation({
|
||||
testCase:
|
||||
'Verifies that a user can unstake Ethereum. Holesky testnet can be used as backup',
|
||||
'Verifies that a user can unstake Ethereum. Hoodi testnet can be used as backup',
|
||||
prerequisites: [
|
||||
'Seeded Trezor device with transactions with "all" seed',
|
||||
'Connected Trezor Suite',
|
||||
@@ -74,7 +74,7 @@ test.describe.skip('Ethereum staking legacy FW', { tag: ['@group=manual'] }, ()
|
||||
{
|
||||
annotation: createTestAnnotation({
|
||||
testCase:
|
||||
'Verifies that a user can claim Ethereum rewards. Holesky testnet can be used as backup',
|
||||
'Verifies that a user can claim Ethereum rewards. Hoodi testnet can be used as backup',
|
||||
prerequisites: [
|
||||
'Seeded Trezor device with transactions with "all" seed',
|
||||
'Connected Trezor Suite',
|
||||
|
||||
@@ -36,7 +36,7 @@ test.describe('Coin Settings', { tag: ['@group=settings'] }, () => {
|
||||
'sol',
|
||||
'test',
|
||||
'tsep',
|
||||
'thol',
|
||||
'thod',
|
||||
'txrp',
|
||||
// 'txlm', add when removed from experimental features
|
||||
'dsol',
|
||||
|
||||
@@ -32,7 +32,7 @@ export const allowedDomains = [
|
||||
'trezor-cardano-mainnet.blockfrost.io',
|
||||
'trezor-cardano-preview.blockfrost.io',
|
||||
'blockfrost.dev',
|
||||
'eth-api-b2c-stage.everstake.one', // staking endpoint for Holesky testnet, works only with VPN
|
||||
'eth-api-b2c-stage.everstake.one', // staking endpoint for Hoodi testnet, works only with VPN
|
||||
'eth-api-b2c.everstake.one', // staking endpoint for Ethereum mainnet
|
||||
'dashboard-api.everstake.one', // staking endpoint for Solana
|
||||
'stake-sync-api.everstake.one', // staking rewards endpoint for Solana
|
||||
|
||||
@@ -69,7 +69,7 @@ const initStore = ({ send, fees, selectedAccount, coinjoin, bitcoinAmountUnit }:
|
||||
wallet: {
|
||||
send,
|
||||
coinjoin,
|
||||
settings: { bitcoinAmountUnit, enabledNetworks: ['thol'] },
|
||||
settings: { bitcoinAmountUnit, enabledNetworks: ['thod'] },
|
||||
},
|
||||
suite: { settings: { language: 'en' } },
|
||||
router: { route: { name: 'wallet-send' } },
|
||||
|
||||
@@ -552,7 +552,7 @@ export const runLegacyMigrations: OnUpgradeFunc<SuiteDBSchema> = async (
|
||||
// remove trop from backend settings
|
||||
const backendSettings = transaction.objectStore('backendSettings');
|
||||
// @ts-expect-error
|
||||
backendSettings.delete('trop');
|
||||
await backendSettings.delete('trop');
|
||||
}
|
||||
|
||||
if (oldVersion < 37) {
|
||||
|
||||
@@ -186,7 +186,7 @@ export const migrateToV56: OnUpgradeFunc<SuiteDBSchema> = async (
|
||||
|
||||
// refetch also evm txs for version 52+
|
||||
if (oldVersion >= 52) {
|
||||
accountsToUpdate.push(...['eth', 'pol', 'bsc', 'base', 'arb', 'op', 'thol', 'tsep']);
|
||||
accountsToUpdate.push(...['eth', 'pol', 'bsc', 'base', 'arb', 'op', 'thod', 'tsep']);
|
||||
}
|
||||
|
||||
await updateAll<'txs', DBWalletAccountTransactionCompatible>(transaction, 'txs', tx => {
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import type { IDBPTransaction, StoreNames } from 'idb';
|
||||
|
||||
import type { SuiteDBSchema } from '../../definitions';
|
||||
import { updateAll } from '../utils';
|
||||
|
||||
export async function removeNetwork(
|
||||
tx: IDBPTransaction<SuiteDBSchema, StoreNames<SuiteDBSchema>[], 'versionchange'>,
|
||||
removedNetworkSymbol: string,
|
||||
) {
|
||||
// remove a network transactions, change token address to contract
|
||||
if (tx.objectStoreNames.contains('txs')) {
|
||||
await updateAll(tx, 'txs', tx => {
|
||||
if (tx.tx.symbol === removedNetworkSymbol) {
|
||||
return null;
|
||||
}
|
||||
|
||||
tx.tx.tokens.forEach(token => {
|
||||
// @ts-expect-error
|
||||
token.contract = token.address;
|
||||
// @ts-expect-error
|
||||
delete token.address;
|
||||
});
|
||||
|
||||
return tx;
|
||||
});
|
||||
}
|
||||
|
||||
// remove a network accounts, change token address to contract
|
||||
if (tx.objectStoreNames.contains('accounts')) {
|
||||
await updateAll(tx, 'accounts', account => {
|
||||
if (account.symbol === removedNetworkSymbol) {
|
||||
return null;
|
||||
}
|
||||
|
||||
account.tokens?.forEach(token => {
|
||||
// @ts-expect-error
|
||||
token.contract = token.address;
|
||||
// @ts-expect-error
|
||||
delete token.address;
|
||||
});
|
||||
|
||||
return account;
|
||||
});
|
||||
}
|
||||
|
||||
// remove a network from coin settings
|
||||
if (tx.objectStoreNames.contains('walletSettings')) {
|
||||
await updateAll(tx, 'walletSettings', walletSettings => {
|
||||
walletSettings.enabledNetworks = walletSettings.enabledNetworks.filter(
|
||||
network => network !== removedNetworkSymbol,
|
||||
);
|
||||
|
||||
return walletSettings;
|
||||
});
|
||||
}
|
||||
|
||||
// remove a from backend settings
|
||||
if (tx.objectStoreNames.contains('backendSettings')) {
|
||||
const backendSettings = tx.objectStore('backendSettings');
|
||||
// @ts-expect-error
|
||||
await backendSettings.delete(removedNetworkSymbol);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import { DeviceModelInternal } from '@trezor/device-utils';
|
||||
|
||||
import { SuiteDBSchema } from 'src/storage/definitions';
|
||||
|
||||
import { removeNetwork } from '../networks/removeNetwork';
|
||||
|
||||
type DeletedSecurityType =
|
||||
| {
|
||||
devicesWithFailedEntropyCheck?: (string | null)[];
|
||||
@@ -44,4 +46,7 @@ export default createMigration<SuiteDBSchema>('25.10.0', async (db, tx) => {
|
||||
// @ts-expect-error security no longer exists
|
||||
db.deleteObjectStore('security');
|
||||
}
|
||||
|
||||
// Remove Holesky test network. Now there's Hoodi (tHOD) test network.
|
||||
await removeNetwork(tx, 'thol');
|
||||
});
|
||||
|
||||
@@ -86,7 +86,7 @@ export const Address = ({ output, outputId, outputsCount }: AddressProps) => {
|
||||
|
||||
const [isExternalAddressCheckWarningDismissed, setIsExternalAddressCheckWarningDismissed] =
|
||||
useState(false);
|
||||
const isExternalAddressCheckEnabled = ['eth', 'tsep', 'thol', 'sol', 'dsol'].includes(symbol);
|
||||
const isExternalAddressCheckEnabled = ['eth', 'tsep', 'thod', 'sol', 'dsol'].includes(symbol);
|
||||
|
||||
useEffect(() => {
|
||||
setIsExternalAddressCheckWarningDismissed(false);
|
||||
@@ -341,7 +341,7 @@ export const Address = ({ output, outputId, outputsCount }: AddressProps) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Check if address is a contract address (right now only for Eth, Holesky and Sepolia)
|
||||
// 2. Check if address is a contract address (right now only for Eth, Hoodi and Sepolia)
|
||||
if (!isExternalAddressCheckWarningDismissed && isExternalAddressCheckEnabled) {
|
||||
const isContract = payload.misc?.contractInfo;
|
||||
if (isContract) {
|
||||
|
||||
@@ -24,7 +24,7 @@ export const coinsColors: CoinsColors = {
|
||||
sol: '#9945ff',
|
||||
tada: '#3468d1',
|
||||
test: '#e75f5f',
|
||||
thol: '#454a75',
|
||||
thod: '#454a75',
|
||||
tsep: '#454a75',
|
||||
txlm: '#e75f5f',
|
||||
txrp: '#e75f5f',
|
||||
|
||||
@@ -13,7 +13,7 @@ export const isWhitelistedHost = (
|
||||
return whitelist.some(
|
||||
whitelistedUrl =>
|
||||
whitelistedUrl === hostname ||
|
||||
// This needs to be here to allow sub-domains (like btc1.trezor.io, holesky1.trezor.io, ...,
|
||||
// This needs to be here to allow sub-domains (like btc1.trezor.io, hoodi1.trezor.io, ...,
|
||||
hostname.endsWith(`.${whitelistedUrl}`),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ describe(isWhitelistedHost.name, () => {
|
||||
{ hostname: 'trezor.io', result: true },
|
||||
{ hostname: '', result: false },
|
||||
{ hostname: ' ', result: false },
|
||||
{ hostname: 'holesky1.trezor.io', result: true },
|
||||
{ hostname: 'hoodi1.trezor.io', result: true },
|
||||
{ hostname: 'tbtc1.trezor.io', result: true },
|
||||
{ hostname: 'scam-url.io', result: false },
|
||||
{ hostname: 'scam-url-trezor.io', result: false },
|
||||
|
||||
|
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 663 B |
@@ -26,7 +26,7 @@ export const cryptoIcons = {
|
||||
sol: require('../cryptoAssets/cryptoIcons/sol.svg'),
|
||||
tada: require('../cryptoAssets/cryptoIcons/tada.svg'),
|
||||
test: require('../cryptoAssets/cryptoIcons/test.svg'),
|
||||
thol: require('../cryptoAssets/cryptoIcons/thol.svg'),
|
||||
thod: require('../cryptoAssets/cryptoIcons/thod.svg'),
|
||||
tsep: require('../cryptoAssets/cryptoIcons/tsep.svg'),
|
||||
txlm: require('../cryptoAssets/cryptoIcons/txlm.svg'),
|
||||
txrp: require('../cryptoAssets/cryptoIcons/txrp.svg'),
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"type-check": "yarn g:tsc --build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@everstake/wallet-sdk-ethereum": "1.0.3",
|
||||
"@everstake/wallet-sdk-ethereum": "1.0.4",
|
||||
"@suite-common/wallet-config": "workspace:*",
|
||||
"@suite-common/wallet-constants": "workspace:*",
|
||||
"@suite-common/wallet-core": "workspace:*",
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ETH_NETWORK_ADDRESSES } from '@everstake/wallet-sdk-ethereum';
|
||||
|
||||
export const transformTxFixtures = [
|
||||
{
|
||||
description:
|
||||
@@ -6,7 +8,7 @@ export const transformTxFixtures = [
|
||||
data: '0x3a29dbae0000000000000000000000000000000000000000000000000000000000000001',
|
||||
from: '0xCe66A9577F4e2589c1D1547B75B7A2b0807cE0ed',
|
||||
gasLimit: 416102,
|
||||
to: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
to: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
value: '122222000000000000',
|
||||
},
|
||||
gasPrice: '50',
|
||||
@@ -18,7 +20,7 @@ export const transformTxFixtures = [
|
||||
gasPrice: '0xba43b7400',
|
||||
nonce: '0x1a',
|
||||
chainId: 1,
|
||||
to: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
to: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
value: '0x1b23842edbce000',
|
||||
},
|
||||
},
|
||||
@@ -29,7 +31,7 @@ export const transformTxFixtures = [
|
||||
data: '0x3a29dbae0000000000000000000000000000000000000000000000000000000000000001',
|
||||
from: '0xCe66A9577F4e2589c1D1547B75B7A2b0807cE0ed',
|
||||
gasLimit: 300000,
|
||||
to: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
to: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
value: '10000',
|
||||
},
|
||||
gasPrice: '1',
|
||||
@@ -41,7 +43,7 @@ export const transformTxFixtures = [
|
||||
gasPrice: '0x3b9aca00',
|
||||
nonce: '0x1',
|
||||
chainId: 1,
|
||||
to: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
to: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
value: '0x2710',
|
||||
},
|
||||
},
|
||||
@@ -66,7 +68,7 @@ export const stakeFixture = [
|
||||
data: '0x3a29dbae0000000000000000000000000000000000000000000000000000000000000001',
|
||||
from: '0xfB0bc552ab5Fa1971E8530852753c957e29eEEFC',
|
||||
gasLimit: 241000, // 21000 + 220000 (reserve)
|
||||
to: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
value: '100000000000000000', // wei
|
||||
},
|
||||
},
|
||||
@@ -88,7 +90,7 @@ export const stakeFixture = [
|
||||
data: '0x3a29dbae0000000000000000000000000000000000000000000000000000000000000001',
|
||||
from: '0xfB0bc552ab5Fa1971E8530852753c957e29eEEFC',
|
||||
gasLimit: 220000, // GAS_RESERVE = 220000
|
||||
to: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
value: '100000000000000000', // wei
|
||||
},
|
||||
},
|
||||
@@ -162,7 +164,7 @@ export const unstakeFixture = [
|
||||
data: '0x76ec871c000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000001',
|
||||
from: '0xfB0bc552ab5Fa1971E8530852753c957e29eEEFC',
|
||||
gasLimit: 241000, // 21000 + 220000
|
||||
to: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
value: '0', // wei
|
||||
},
|
||||
},
|
||||
@@ -301,7 +303,7 @@ export const claimFixture = [
|
||||
result: {
|
||||
data: '0x33986ffa', // claim signature
|
||||
from: '0xfB0bc552ab5Fa1971E8530852753c957e29eEEFC',
|
||||
to: '0x7a7f0b3c23C23a31cFcb0c44709be70d4D545c6e', // contract accounting address
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractAccounting, // contract accounting address
|
||||
value: '0', // wei
|
||||
gasLimit: 241000, // 21000 + 220000
|
||||
},
|
||||
@@ -313,7 +315,7 @@ export const claimFailedFixture = [
|
||||
description: 'should throw an error when account info is failed',
|
||||
args: {
|
||||
from: '0xfB0bc552ab5Fa1971E8530852753c957e29eEEFC',
|
||||
symbol: 'thol',
|
||||
symbol: 'thod',
|
||||
identity: '0',
|
||||
},
|
||||
accountInfo: {
|
||||
@@ -656,11 +658,11 @@ export const getAdjustedGasLimitConsumptionFixture = [
|
||||
|
||||
export const getEthNetworkForWalletSdkFixture = [
|
||||
{
|
||||
description: 'should return "holesky" for "thol"',
|
||||
description: 'should return "hoodi" for "thod"',
|
||||
args: {
|
||||
symbol: 'thol' as const,
|
||||
symbol: 'thod' as const,
|
||||
},
|
||||
result: 'holesky',
|
||||
result: 'hoodi',
|
||||
},
|
||||
{
|
||||
description: 'should return "mainnet" for "eth"',
|
||||
@@ -690,8 +692,8 @@ export const getInstantStakeTypeFixture = [
|
||||
description: 'should return "stake" for valid instant stake transfer (mainnet)',
|
||||
args: {
|
||||
internalTransfer: {
|
||||
from: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
to: '0x19449f0f696703Aa3b1485DfA2d855F33659397a',
|
||||
from: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractWithdrawTreasury,
|
||||
},
|
||||
address: 'address',
|
||||
symbol: 'eth' as const,
|
||||
@@ -699,14 +701,14 @@ export const getInstantStakeTypeFixture = [
|
||||
result: 'stake',
|
||||
},
|
||||
{
|
||||
description: 'should return "stake" for valid instant stake transfer (hokesky)',
|
||||
description: 'should return "stake" for valid instant stake transfer (hoodi)',
|
||||
args: {
|
||||
internalTransfer: {
|
||||
from: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
to: '0x66cb3AeD024740164EBcF04e292dB09b5B63A2e1',
|
||||
from: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
to: ETH_NETWORK_ADDRESSES.hoodi.addressContractWithdrawTreasury,
|
||||
},
|
||||
address: 'address',
|
||||
symbol: 'thol' as const,
|
||||
symbol: 'thod' as const,
|
||||
},
|
||||
result: 'stake',
|
||||
},
|
||||
@@ -714,7 +716,7 @@ export const getInstantStakeTypeFixture = [
|
||||
description: 'should return "unstake" for valid instant unstake transfer (mainnet)',
|
||||
args: {
|
||||
internalTransfer: {
|
||||
from: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
from: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
to: 'address',
|
||||
},
|
||||
address: 'address',
|
||||
@@ -723,14 +725,14 @@ export const getInstantStakeTypeFixture = [
|
||||
result: 'unstake',
|
||||
},
|
||||
{
|
||||
description: 'should return "unstake" for valid instant unstake transfer (hokesky)',
|
||||
description: 'should return "unstake" for valid instant unstake transfer (hoodi)',
|
||||
args: {
|
||||
internalTransfer: {
|
||||
from: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
from: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
to: 'address',
|
||||
},
|
||||
address: 'address',
|
||||
symbol: 'thol' as const,
|
||||
symbol: 'thod' as const,
|
||||
},
|
||||
result: 'unstake',
|
||||
},
|
||||
@@ -738,7 +740,7 @@ export const getInstantStakeTypeFixture = [
|
||||
description: 'should return "claim" for valid claim transfer (mainnet)',
|
||||
args: {
|
||||
internalTransfer: {
|
||||
from: '0x19449f0f696703Aa3b1485DfA2d855F33659397a',
|
||||
from: ETH_NETWORK_ADDRESSES.mainnet.addressContractWithdrawTreasury,
|
||||
to: 'address',
|
||||
},
|
||||
address: 'address',
|
||||
@@ -747,14 +749,14 @@ export const getInstantStakeTypeFixture = [
|
||||
result: 'claim',
|
||||
},
|
||||
{
|
||||
description: 'should return "claim" for valid claim transfer (hokesky)',
|
||||
description: 'should return "claim" for valid claim transfer (hoodi)',
|
||||
args: {
|
||||
internalTransfer: {
|
||||
from: '0x66cb3AeD024740164EBcF04e292dB09b5B63A2e1',
|
||||
from: ETH_NETWORK_ADDRESSES.hoodi.addressContractWithdrawTreasury,
|
||||
to: 'address',
|
||||
},
|
||||
address: 'address',
|
||||
symbol: 'thol' as const,
|
||||
symbol: 'thod' as const,
|
||||
},
|
||||
result: 'claim',
|
||||
},
|
||||
@@ -812,8 +814,8 @@ export const getChangedInternalTxFixture = [
|
||||
txid: '1',
|
||||
internalTransfers: [
|
||||
{
|
||||
from: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
to: '0x19449f0f696703Aa3b1485DfA2d855F33659397a',
|
||||
from: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractWithdrawTreasury,
|
||||
type: 'external',
|
||||
amount: '1',
|
||||
},
|
||||
@@ -825,8 +827,8 @@ export const getChangedInternalTxFixture = [
|
||||
symbol: 'eth' as const,
|
||||
},
|
||||
result: {
|
||||
from: '0xD523794C879D9eC028960a231F866758e405bE34',
|
||||
to: '0x19449f0f696703Aa3b1485DfA2d855F33659397a',
|
||||
from: ETH_NETWORK_ADDRESSES.mainnet.addressContractPool,
|
||||
to: ETH_NETWORK_ADDRESSES.mainnet.addressContractWithdrawTreasury,
|
||||
type: 'external',
|
||||
amount: '1',
|
||||
},
|
||||
@@ -849,7 +851,7 @@ export const simulateUnstakeFixture = [
|
||||
args: {
|
||||
amount: '0.1',
|
||||
from: '0xfB0bc552ab5Fa1971E8530852753c957e29eEEFC',
|
||||
to: '0xAFA848357154a6a624686b348303EF9a13F63264',
|
||||
to: ETH_NETWORK_ADDRESSES.hoodi.addressContractPool,
|
||||
symbol: 'eth',
|
||||
},
|
||||
blockchainEvmRpcCallResult: {
|
||||
|
||||
@@ -229,8 +229,8 @@ describe('getAdjustedGasLimitConsumption', () => {
|
||||
|
||||
describe('getEthNetworkForWalletSdk', () => {
|
||||
getEthNetworkForWalletSdkFixture.forEach(test => {
|
||||
it(test.description, async () => {
|
||||
const result = await getEthNetworkForWalletSdk(test.args.symbol);
|
||||
it(test.description, () => {
|
||||
const result = getEthNetworkForWalletSdk(test.args.symbol);
|
||||
expect(result).toEqual(test.result);
|
||||
});
|
||||
});
|
||||
@@ -238,8 +238,8 @@ describe('getEthNetworkForWalletSdk', () => {
|
||||
|
||||
describe('getInstantStakeType', () => {
|
||||
getInstantStakeTypeFixture.forEach(test => {
|
||||
it(test.description, async () => {
|
||||
const result = await getInstantStakeType(
|
||||
it(test.description, () => {
|
||||
const result = getInstantStakeType(
|
||||
test.args.internalTransfer as InternalTransfer,
|
||||
test.args.address,
|
||||
test.args.symbol,
|
||||
|
||||
@@ -8,7 +8,7 @@ export interface StakingTotalRewards {
|
||||
lastSuccessfulFetchTimestamp?: Timestamp;
|
||||
}
|
||||
|
||||
export type EthNetwork = 'holesky' | 'mainnet';
|
||||
export type EthNetwork = 'hoodi' | 'mainnet';
|
||||
|
||||
export type StakeTxBaseArgs = {
|
||||
from: string;
|
||||
|
||||
@@ -46,7 +46,7 @@ export const getEthNetworkForWalletSdk = (
|
||||
symbol: NetworkSymbol | 'unknown' | undefined,
|
||||
): EthNetwork => {
|
||||
const ethNetworks: PartialRecord<NetworkSymbol, EthNetwork> = {
|
||||
thol: 'holesky',
|
||||
thod: 'hoodi',
|
||||
eth: 'mainnet',
|
||||
};
|
||||
const network = symbol && symbol !== 'unknown' ? ethNetworks[symbol] : null;
|
||||
|
||||
@@ -42,7 +42,7 @@ export type Protocol =
|
||||
| 'test'
|
||||
| 'regtest'
|
||||
| 'tsep'
|
||||
| 'thol'
|
||||
| 'thod'
|
||||
| 'txrp'
|
||||
| 'txlm'
|
||||
| 'tada'
|
||||
@@ -67,7 +67,7 @@ export const NETWORK_TO_PROTOCOLS: Record<NetworkSymbol, Protocol[]> = {
|
||||
test: ['test'],
|
||||
regtest: ['regtest'],
|
||||
tsep: ['tsep'],
|
||||
thol: ['thol'],
|
||||
thod: ['thod'],
|
||||
txrp: ['txrp'],
|
||||
tada: ['tada'],
|
||||
dsol: ['dsol'],
|
||||
|
||||
@@ -53,7 +53,7 @@ describe('mapTestnetCryptoCurrency', () => {
|
||||
['eth', 'eth'],
|
||||
['test', 'btc'],
|
||||
['tsep', 'eth'],
|
||||
['thol', 'eth'],
|
||||
['thod', 'eth'],
|
||||
['txrp', 'xrp'],
|
||||
['txlm', 'xlm'],
|
||||
['tada', 'ada'],
|
||||
|
||||
@@ -130,10 +130,10 @@ export const getUnusedAddressFromAccount = (account: Account) => {
|
||||
|
||||
export const mapTestnetSymbol = (
|
||||
symbol: NetworkSymbol,
|
||||
): Exclude<NetworkSymbol, 'test' | 'tsep' | 'thol' | 'txrp' | 'txlm' | 'tada'> => {
|
||||
): Exclude<NetworkSymbol, 'test' | 'tsep' | 'thod' | 'txrp' | 'txlm' | 'tada'> => {
|
||||
if (symbol === 'test') return 'btc';
|
||||
if (symbol === 'tsep') return 'eth';
|
||||
if (symbol === 'thol') return 'eth';
|
||||
if (symbol === 'thod') return 'eth';
|
||||
if (symbol === 'txrp') return 'xrp';
|
||||
if (symbol === 'txlm') return 'xlm';
|
||||
if (symbol === 'tada') return 'ada';
|
||||
|
||||
@@ -527,16 +527,16 @@ export const networks = {
|
||||
coingeckoId: 'sepolia-test-ethereum', // fake, coingecko does not have testnets
|
||||
tradeCryptoId: 'sepolia-test-ethereum', // fake, coingecko does not have testnets
|
||||
},
|
||||
thol: {
|
||||
symbol: 'thol',
|
||||
thod: {
|
||||
symbol: 'thod',
|
||||
displaySymbol: 'tETH',
|
||||
name: 'Ethereum Holesky',
|
||||
name: 'Ethereum Hoodi',
|
||||
networkType: 'ethereum',
|
||||
bip43Path: "m/44'/1'/0'/0/i",
|
||||
chainId: 17000,
|
||||
chainId: 560048,
|
||||
decimals: 18,
|
||||
testnet: true,
|
||||
explorer: getExplorerUrls('https://holesky.etherscan.io', 'ethereum'),
|
||||
explorer: getExplorerUrls('https://hoodi.etherscan.io/', 'ethereum'),
|
||||
features: [
|
||||
'rbf',
|
||||
'sign-verify',
|
||||
@@ -549,8 +549,8 @@ export const networks = {
|
||||
],
|
||||
backendTypes: ['blockbook'],
|
||||
accountTypes: {},
|
||||
coingeckoId: 'holesky-test-ethereum', // fake, coingecko does not have testnets
|
||||
tradeCryptoId: 'holesky-test-ethereum', // fake, coingecko does not have testnets
|
||||
coingeckoId: 'hoodi-test-ethereum', // fake, coingecko does not have testnets
|
||||
tradeCryptoId: 'hoodi-test-ethereum', // fake, coingecko does not have testnets
|
||||
},
|
||||
dsol: {
|
||||
symbol: 'dsol',
|
||||
|
||||
@@ -21,7 +21,7 @@ export type NetworkSymbol =
|
||||
| 'test'
|
||||
| 'regtest'
|
||||
| 'tsep'
|
||||
| 'thol'
|
||||
| 'thod'
|
||||
| 'txrp'
|
||||
| 'txlm'
|
||||
| 'tada'
|
||||
|
||||
@@ -8,7 +8,7 @@ export const EVERSTAKE_ENDPOINT_PREFIX: Record<
|
||||
string
|
||||
> = {
|
||||
eth: 'https://eth-api-b2c.everstake.one/api/v1',
|
||||
thol: 'https://eth-api-b2c-stage.everstake.one/api/v1',
|
||||
thod: 'https://eth-api-b2c-stage.everstake.one/api/v1',
|
||||
sol: 'https://dashboard-api.everstake.one',
|
||||
dsol: 'https://dashboard-api.everstake.one',
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export type StakeType = 'stake' | 'unstake' | 'claim';
|
||||
|
||||
export const supportedNetworkSymbols = ['eth', 'thol'] as const;
|
||||
export const supportedNetworkSymbols = ['eth', 'thod'] as const;
|
||||
|
||||
export type SupportedEthereumNetworkSymbol = (typeof supportedNetworkSymbols)[number];
|
||||
|
||||
@@ -155,7 +155,7 @@ describe('account utils', () => {
|
||||
it('isTestnet', () => {
|
||||
expect(isTestnet('test')).toEqual(true);
|
||||
expect(isTestnet('tsep')).toEqual(true);
|
||||
expect(isTestnet('thol')).toEqual(true);
|
||||
expect(isTestnet('thod')).toEqual(true);
|
||||
expect(isTestnet('txrp')).toEqual(true);
|
||||
expect(isTestnet('txlm')).toEqual(true);
|
||||
expect(isTestnet('btc')).toEqual(false);
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('validation', () => {
|
||||
expect(isAddressValid('bc1zw508d6qejxtdg4y5r3zarvaryvg6kdaj', 'test')).toEqual(false);
|
||||
expect(isAddressValid('BC1SW50QA3JX3S', 'test')).toEqual(false);
|
||||
|
||||
// ETH, ETC, TSEP, THOL
|
||||
// ETH, ETC, TSEP, THOD
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF', 'eth')).toEqual(true);
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF0', 'eth')).toEqual(false);
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF', 'etc')).toEqual(true);
|
||||
@@ -81,8 +81,8 @@ describe('validation', () => {
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF0', 'tsep')).toEqual(
|
||||
false,
|
||||
);
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF', 'thol')).toEqual(true);
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF0', 'thol')).toEqual(
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF', 'thod')).toEqual(true);
|
||||
expect(isAddressValid('0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF0', 'thod')).toEqual(
|
||||
false,
|
||||
);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export const getStakingLimitsByNetworkSymbol = (
|
||||
): StakingLimits | null => {
|
||||
switch (symbol) {
|
||||
case 'tsep':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'eth':
|
||||
return {
|
||||
MIN_AMOUNT_FOR_STAKING: MIN_ETH_AMOUNT_FOR_STAKING,
|
||||
|
||||
@@ -30,7 +30,7 @@ const getCoinFromTestnet = (symbol: Account['symbol']) => {
|
||||
case 'dsol':
|
||||
return 'sol';
|
||||
case 'tsep':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
return 'eth';
|
||||
default:
|
||||
return symbol;
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('selectDiscoverySupportedNetworks', () => {
|
||||
// Test networks should be filtered out
|
||||
expect(networkSymbols).not.toContain('test');
|
||||
expect(networkSymbols).not.toContain('tsep');
|
||||
expect(networkSymbols).not.toContain('thol');
|
||||
expect(networkSymbols).not.toContain('thod');
|
||||
expect(networkSymbols).not.toContain('txrp');
|
||||
expect(networkSymbols).not.toContain('txlm');
|
||||
expect(networkSymbols).not.toContain('tada');
|
||||
@@ -77,7 +77,7 @@ describe('selectDiscoverySupportedNetworks', () => {
|
||||
// Test networks should be included
|
||||
expect(networkSymbols).toContain('test');
|
||||
expect(networkSymbols).toContain('tsep');
|
||||
expect(networkSymbols).toContain('thol');
|
||||
expect(networkSymbols).toContain('thod');
|
||||
expect(networkSymbols).toContain('txrp');
|
||||
expect(networkSymbols).toContain('txlm');
|
||||
expect(networkSymbols).toContain('tada');
|
||||
@@ -131,7 +131,7 @@ describe('selectDiscoverySupportedNetworks', () => {
|
||||
// Test networks should be included due to forced parameter
|
||||
expect(networkSymbols).toContain('test');
|
||||
expect(networkSymbols).toContain('tsep');
|
||||
expect(networkSymbols).toContain('thol');
|
||||
expect(networkSymbols).toContain('thod');
|
||||
expect(networkSymbols).toContain('txrp');
|
||||
expect(networkSymbols).toContain('txlm');
|
||||
expect(networkSymbols).toContain('tada');
|
||||
|
||||
@@ -61,7 +61,7 @@ export const useAddressValidationAlerts = ({ inputIndex }: UseAddressValidationA
|
||||
|
||||
const shouldCheckContractAddress =
|
||||
(wasTokenAlertDisplayed || !shouldShowTokenAlert) &&
|
||||
['eth', 'tsep', 'thol'].includes(symbol) &&
|
||||
['eth', 'tsep', 'thod'].includes(symbol) &&
|
||||
!wasContractAlertDisplayed;
|
||||
|
||||
if (shouldShowTokenAlert) {
|
||||
|
||||
@@ -47,7 +47,7 @@ export const selectDeviceAccountsWithStaking = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectVisibleDeviceEthereumAccountsWithStakingByNetworkSymbol(state, 'eth');
|
||||
case 'dsol':
|
||||
@@ -72,7 +72,7 @@ export const getAccountCryptoBalanceWithStaking = (account: Account | null) => {
|
||||
|
||||
switch (account.symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return getEthereumCryptoBalanceWithStaking(account);
|
||||
case 'dsol':
|
||||
@@ -102,7 +102,7 @@ export const selectAccountHasStaking = (state: NativeStakingRootState, accountKe
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumAccountHasStaking(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -125,7 +125,7 @@ export const selectIsStakePendingByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumIsStakePendingByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -148,7 +148,7 @@ export const selectIsStakeConfirmingByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumIsStakeConfirmingByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -181,7 +181,7 @@ export const selectStakedBalanceByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumStakedBalanceByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -204,7 +204,7 @@ export const selectRewardsBalanceByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumRewardsBalanceByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -228,7 +228,7 @@ export const selectTotalStakePendingByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumTotalStakePendingByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -251,7 +251,7 @@ export const selectClaimableAmountByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumClaimableAmountByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
@@ -274,7 +274,7 @@ export const selectCanClaimByAccountKey = (
|
||||
|
||||
switch (symbol) {
|
||||
case 'eth':
|
||||
case 'thol':
|
||||
case 'thod':
|
||||
case 'tsep':
|
||||
return selectEthereumCanClaimByAccountKey(state, accountKey);
|
||||
case 'dsol':
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NetworkSymbol } from '@suite-common/wallet-config';
|
||||
import { isArrayMember } from '@trezor/utils';
|
||||
|
||||
const stakingCoins = ['eth', 'thol', 'tsep', 'sol', 'dsol'] as const satisfies NetworkSymbol[];
|
||||
const stakingCoins = ['eth', 'thod', 'tsep', 'sol', 'dsol'] as const satisfies NetworkSymbol[];
|
||||
type NetworkSymbolWithStaking = (typeof stakingCoins)[number];
|
||||
|
||||
export const doesCoinSupportStaking = (symbol: NetworkSymbol): symbol is NetworkSymbolWithStaking =>
|
||||
|
||||
@@ -28,7 +28,7 @@ type NetworkSymbol =
|
||||
| 'test'
|
||||
| 'regtest'
|
||||
| 'tsep'
|
||||
| 'thol'
|
||||
| 'thod'
|
||||
| 'txrp'
|
||||
| 'ada'
|
||||
| 'tada'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getFeeDecimals, getFeeValue } from '../utils';
|
||||
|
||||
describe('utils', () => {
|
||||
describe('getFeeDecimals', () => {
|
||||
it.each(['eth', 'pol', 'bsc', 'arb', 'base', 'op', 'etc', 'tsep', 'thol'])(
|
||||
it.each(['eth', 'pol', 'bsc', 'arb', 'base', 'op', 'etc', 'tsep', 'thod'])(
|
||||
'should return 9 decimals for Ethereum network: %s',
|
||||
symbol => {
|
||||
expect(getFeeDecimals({ symbol: symbol as NetworkSymbol })).toBe(9);
|
||||
@@ -73,7 +73,7 @@ describe('utils', () => {
|
||||
},
|
||||
);
|
||||
|
||||
it.each(['eth', 'pol', 'bsc', 'arb', 'base', 'op', 'etc', 'tsep', 'thol'])(
|
||||
it.each(['eth', 'pol', 'bsc', 'arb', 'base', 'op', 'etc', 'tsep', 'thod'])(
|
||||
'should work consistently for Ethereum network variant: %s',
|
||||
symbol => {
|
||||
expect(
|
||||
|
||||
10
yarn.lock
10
yarn.lock
@@ -3830,14 +3830,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@everstake/wallet-sdk-ethereum@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "@everstake/wallet-sdk-ethereum@npm:1.0.3"
|
||||
"@everstake/wallet-sdk-ethereum@npm:1.0.4":
|
||||
version: 1.0.4
|
||||
resolution: "@everstake/wallet-sdk-ethereum@npm:1.0.4"
|
||||
dependencies:
|
||||
bignumber.js: "npm:^9.3.0"
|
||||
ethereum-multicall: "npm:^2.26.0"
|
||||
web3: "npm:4.16.0"
|
||||
checksum: 10/5d702ff90b22bf898d48834e791ac38d429c57846cc58bc04858c195c4ea19397cc3dc4a127bc011301a910a1f3c35fd2f8fed2f3625dcecdcb78bb17b80317c
|
||||
checksum: 10/3a99a1accd07f6ff5d547b87f2e5f4f3d4b4286e9a958293bc96e3b444049a811a22dd57704b1f673e2fef2224f85f7aa019c792b6a9fe5cba828ad48e568cfd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -10505,7 +10505,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@suite-common/staking@workspace:suite-common/staking"
|
||||
dependencies:
|
||||
"@everstake/wallet-sdk-ethereum": "npm:1.0.3"
|
||||
"@everstake/wallet-sdk-ethereum": "npm:1.0.4"
|
||||
"@suite-common/wallet-config": "workspace:*"
|
||||
"@suite-common/wallet-constants": "workspace:*"
|
||||
"@suite-common/wallet-core": "workspace:*"
|
||||
|
||||
Reference in New Issue
Block a user