Skip to content

Commit

Permalink
fix process add chain and switch chain
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Jan 7, 2024
1 parent 9e96a35 commit 3beac06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/network/createMetamaskMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function createAddChainMiddleware({ processAddChain }) {
if (!symbol) throw new Error('createAddChainMiddleware - params.nativeCurrency.symbol not provided')
if (decimals === undefined) throw new Error('createAddChainMiddleware - params.nativeCurrency.decimals not provided')

response.result = await processAddChain(request.params, request)
response.result = await processAddChain(finalObj, request)
return undefined
})
}
Expand All @@ -108,7 +108,7 @@ export function createSwitchChainMiddleware({ processSwitchChain }) {
const { chainId } = finalObj || {}
if (!chainId) throw new Error('createSwitchChainMiddleware - params.chainId not provided')

response.result = await processSwitchChain(request.params, request)
response.result = await processSwitchChain(finalObj, request)
return undefined
})
}
Expand Down

0 comments on commit 3beac06

Please sign in to comment.