File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2597,24 +2597,25 @@ class Client {
2597
2597
apply : async ( target , thisArg , args ) => {
2598
2598
// Call the original function
2599
2599
const result = Reflect . apply ( target , thisArg , args ) ;
2600
- console . log ( 'result' , result ) ;
2601
2600
txresult = await result ;
2602
2601
// Return the result of the function call
2603
2602
return result ;
2604
2603
} ,
2605
2604
} )
2606
2605
2607
- const t = await func ( )
2608
-
2609
- if ( ! txresult ) {
2610
- throw new Error ( 'Failed to decorate with UtxoFetch' ) ;
2611
- }
2606
+ try {
2607
+ const t = await func ( )
2612
2608
2613
- const { created, spent } = this . previewUtxoChange ( txresult ) ;
2609
+ if ( ! txresult ) {
2610
+ throw new Error ( 'Failed to decorate with UtxoFetch' ) ;
2611
+ }
2614
2612
2615
- this . buildTransaction = originalBuildTransaction ;
2613
+ const { created , spent } = this . previewUtxoChange ( txresult ) ;
2616
2614
2617
- return { result : t , utxo : { created, spent } } ;
2615
+ return { result : t , utxo : { created, spent } } ;
2616
+ } finally {
2617
+ this . buildTransaction = originalBuildTransaction ;
2618
+ }
2618
2619
}
2619
2620
2620
2621
async getAccountOrders ( ) : Promise < OrderData [ ] > {
You can’t perform that action at this time.
0 commit comments