@@ -2,7 +2,10 @@ import { router } from 'expo-router'
22import { ChainId , Network , NetworkVMType } from '@avalabs/core-chains-sdk'
33import { LedgerAppType , LedgerDerivationPathType } from 'services/ledger/types'
44import { z } from 'zod'
5- import { ledgerParamsCache } from '../services/ledgerParamsCache'
5+ import {
6+ ledgerParamsCache ,
7+ StakingProgressParams
8+ } from '../services/ledgerParamsCache'
69
710export const showLedgerReviewTransaction = ( {
811 network,
@@ -29,18 +32,16 @@ export const showLedgerReviewTransaction = ({
2932 } , 100 )
3033}
3134
32- export const getLedgerAppName = ( network : Network ) : LedgerAppType => {
33- return network . chainId === ChainId . AVALANCHE_MAINNET_ID ||
34- network . chainId === ChainId . AVALANCHE_TESTNET_ID ||
35- network . vmName === NetworkVMType . AVM ||
36- network . vmName === NetworkVMType . PVM
35+ export const getLedgerAppName = ( network ? : Network ) : LedgerAppType => {
36+ return network ? .chainId === ChainId . AVALANCHE_MAINNET_ID ||
37+ network ? .chainId === ChainId . AVALANCHE_TESTNET_ID ||
38+ network ? .vmName === NetworkVMType . AVM ||
39+ network ? .vmName === NetworkVMType . PVM
3740 ? LedgerAppType . AVALANCHE
38- : network . vmName === NetworkVMType . EVM
41+ : network ? .vmName === NetworkVMType . EVM
3942 ? LedgerAppType . ETHEREUM
40- : network . vmName === NetworkVMType . BITCOIN
43+ : network ? .vmName === NetworkVMType . BITCOIN
4144 ? LedgerAppType . BITCOIN
42- : network . vmName === NetworkVMType . SVM
43- ? LedgerAppType . SOLANA
4445 : LedgerAppType . UNKNOWN
4546}
4647
0 commit comments