chore: updates @walletconnect deps (#157)
* chore: updates `@walletconnect` deps * fix: cosmos provider * fix: updates web3wallet example * fix: eip155 legacy session request type --------- Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
This commit is contained in:
co-authored by
Gancho Radkov
parent
c6e9c2d614
commit
2810f0178f
@@ -49,18 +49,6 @@ export default function SessionChainCard({ namespace }: IProps) {
|
||||
{chains.map(chainId => {
|
||||
const extensionMethods: SessionTypes.Namespace['methods'] = []
|
||||
const extensionEvents: SessionTypes.Namespace['events'] = []
|
||||
|
||||
namespace.extension?.map(({ accounts, methods, events }) => {
|
||||
accounts.forEach(account => {
|
||||
const [type, chain] = account.split(':')
|
||||
const chainId = `${type}:${chain}`
|
||||
if (chains.includes(chainId)) {
|
||||
extensionMethods.push(...methods)
|
||||
extensionEvents.push(...events)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const allMethods = [...namespace.methods, ...extensionMethods]
|
||||
const allEvents = [...namespace.events, ...extensionEvents]
|
||||
// @ts-expect-error
|
||||
|
||||
@@ -36,19 +36,9 @@ interface IProps {
|
||||
export default function SessionProposalChainCard({ requiredNamespace }: IProps) {
|
||||
return (
|
||||
<Fragment>
|
||||
{requiredNamespace.chains.map(chainId => {
|
||||
const extensionMethods: ProposalTypes.RequiredNamespace['methods'] = []
|
||||
const extensionEvents: ProposalTypes.RequiredNamespace['events'] = []
|
||||
|
||||
requiredNamespace.extension?.map(({ chains, methods, events }) => {
|
||||
if (chains.includes(chainId)) {
|
||||
extensionMethods.push(...methods)
|
||||
extensionEvents.push(...events)
|
||||
}
|
||||
})
|
||||
|
||||
const allMethods = [...requiredNamespace.methods, ...extensionMethods]
|
||||
const allEvents = [...requiredNamespace.events, ...extensionEvents]
|
||||
{requiredNamespace.chains?.map(chainId => {
|
||||
const allMethods = requiredNamespace.methods
|
||||
const allEvents = requiredNamespace.events
|
||||
// @ts-expect-error
|
||||
const rgb = CHAIN_METADATA[chainId]?.rgb
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function SessionProposalModal() {
|
||||
const namespaces: SessionTypes.Namespaces = {}
|
||||
Object.keys(requiredNamespaces).forEach(key => {
|
||||
const accounts: string[] = []
|
||||
requiredNamespaces[key].chains.map(chain => {
|
||||
requiredNamespaces[key].chains?.map(chain => {
|
||||
selectedAccounts[key].map(acc => accounts.push(`${chain}:${acc}`))
|
||||
})
|
||||
namespaces[key] = {
|
||||
|
||||
Reference in New Issue
Block a user