File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ import type { DefaultCapabilitiesSchema } from '../types/capabilities.js'
2+ import type { ExactPartial } from '../types/utils.js'
3+ import type { TransactionRequestTempo } from './Transaction.js'
4+
5+ export type Schema = Omit < DefaultCapabilitiesSchema , 'sendCalls' > & {
6+ sendCalls : {
7+ Request : ExactPartial < TransactionRequestTempo >
8+ }
9+ }
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export function walletNamespaceCompat(
132132 if ( request . method === 'wallet_sendCalls' ) {
133133 const params = request . params [ 0 ] ?? { }
134134 const { capabilities, chainId, from } = params
135- const { sync } = capabilities ?? { }
135+ const { sync, ... properties } = capabilities ?? { }
136136
137137 if ( ! chainId ) throw new Provider . UnsupportedChainIdError ( )
138138 if ( Number ( chainId ) !== client . chain . id )
@@ -150,11 +150,13 @@ export function walletNamespaceCompat(
150150 if ( ! sync )
151151 return sendTransaction ( client , {
152152 account,
153+ ...( properties ? properties : { } ) ,
153154 calls,
154155 } )
155156
156157 const { transactionHash } = await sendTransactionSync ( client , {
157158 account,
159+ ...( properties ? properties : { } ) ,
158160 calls,
159161 } )
160162 return transactionHash
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export * as Abis from './Abis.js'
1515export * as Account from './Account.js'
1616export * as Addresses from './Addresses.js'
1717export * as Actions from './actions/index.js'
18+ export * as Capabilities from './Capabilities.js'
1819export {
1920 type Decorator as TempoActions ,
2021 decorator as tempoActions ,
You can’t perform that action at this time.
0 commit comments