File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - added: Expose engine otherMethods on EdgeMemoryWallet so memory wallets support custom methods like makeMaxSpend.
6+
57## 2.43.6 (2026-04-02)
68
79- fixed: Upgraded @nymproject/mix-fetch with promised reliability improvements.
Original file line number Diff line number Diff line change @@ -147,6 +147,23 @@ export const makeMemoryWalletInner = async (
147147 syncNetworkTask . start ( { wait : false } )
148148 }
149149
150+ const otherMethods : { [ name : string ] : ( ...args : any [ ] ) => any } = { }
151+ if ( engine . otherMethods != null ) {
152+ for ( const name of Object . keys ( engine . otherMethods ) ) {
153+ const method = engine . otherMethods [ name ]
154+ if ( typeof method !== 'function' ) continue
155+ otherMethods [ name ] = method
156+ }
157+ }
158+ if ( engine . otherMethodsWithKeys != null ) {
159+ for ( const name of Object . keys ( engine . otherMethodsWithKeys ) ) {
160+ const method = engine . otherMethodsWithKeys [ name ]
161+ if ( typeof method !== 'function' ) continue
162+ otherMethods [ name ] = ( ...args : any [ ] ) => method ( walletInfo . keys , ...args )
163+ }
164+ }
165+ bridgifyObject ( otherMethods )
166+
150167 const out = bridgifyObject < EdgeMemoryWallet > ( {
151168 watch : watchMethod ,
152169 get balanceMap ( ) {
@@ -196,6 +213,8 @@ export const makeMemoryWalletInner = async (
196213 } ,
197214 async saveTx ( ) { } ,
198215
216+ otherMethods,
217+
199218 async close ( ) {
200219 log . warn ( 'killing memory wallet' )
201220 syncNetworkTask ?. stop ( )
Original file line number Diff line number Diff line change @@ -1473,6 +1473,7 @@ export interface EdgeMemoryWallet {
14731473 readonly signTx : ( tx : EdgeTransaction ) => Promise < EdgeTransaction >
14741474 readonly broadcastTx : ( tx : EdgeTransaction ) => Promise < EdgeTransaction >
14751475 readonly saveTx : ( tx : EdgeTransaction ) => Promise < void >
1476+ readonly otherMethods : EdgeOtherMethods
14761477 readonly close : ( ) => Promise < void >
14771478
14781479 /** @deprecated Use syncStatus */
You can’t perform that action at this time.
0 commit comments