File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
advanced/wallets/react-wallet-v2/src/views Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import useSmartAccounts from '@/hooks/useSmartAccounts'
37
37
import { EIP5792_METHODS } from '@/data/EIP5792Data'
38
38
import { getWalletCapabilities } from '@/utils/EIP5792WalletUtil'
39
39
import { EIP7715_METHOD } from '@/data/EIP7715Data'
40
+ import { useRouter } from 'next/router'
40
41
41
42
const StyledText = styled ( Text , {
42
43
fontWeight : 400
@@ -55,6 +56,10 @@ export default function SessionProposalModal() {
55
56
const [ isLoadingReject , setIsLoadingReject ] = useState ( false )
56
57
const { getAvailableSmartAccountsOnNamespaceChains } = useSmartAccounts ( )
57
58
59
+ const { query } = useRouter ( )
60
+
61
+ const amountsToApproveEvm = Number ( query . amountsToApproveEvm ) || null
62
+
58
63
const supportedNamespaces = useMemo ( ( ) => {
59
64
// eip155
60
65
const eip155Chains = Object . keys ( EIP155_CHAINS )
@@ -106,7 +111,11 @@ export default function SessionProposalModal() {
106
111
methods : eip155Methods . concat ( eip5792Methods ) . concat ( eip7715Methods ) ,
107
112
events : [ 'accountsChanged' , 'chainChanged' ] ,
108
113
accounts : eip155Chains
109
- . map ( chain => eip155Addresses . map ( account => `${ chain } :${ account } ` ) )
114
+ . map ( chain =>
115
+ eip155Addresses
116
+ . map ( account => `${ chain } :${ account } ` )
117
+ . slice ( 0 , amountsToApproveEvm ?? eip155Addresses . length )
118
+ )
110
119
. flat ( )
111
120
} ,
112
121
cosmos : {
You can’t perform that action at this time.
0 commit comments