File tree 2 files changed +9
-10
lines changed
src/clients/walletconnect
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 12
12
"url" : " https://github.com/txnlab/use-wallet/issues"
13
13
},
14
14
"homepage" : " https://txnlab.github.io/use-wallet" ,
15
- "version" : " 1.2.4 " ,
15
+ "version" : " 1.2.5 " ,
16
16
"description" : " React hooks for using Algorand compatible wallets in dApps." ,
17
17
"scripts" : {
18
18
"dev" : " yarn storybook" ,
Original file line number Diff line number Diff line change @@ -234,17 +234,16 @@ class WalletConnectClient extends BaseWallet {
234
234
this . keepWCAliveStop ( ) ;
235
235
236
236
// Join the newly signed transactions with the original group of transactions.
237
- const signedTxns = result . reduce ( ( signedTxns : Uint8Array [ ] , txn , i ) => {
238
- if ( txn ) {
239
- signedTxns . push ( new Uint8Array ( Buffer . from ( txn , "base64" ) ) ) ;
237
+ const signedTxns = transactions . reduce < Uint8Array [ ] > ( ( acc , txn , i ) => {
238
+ if ( signedIndexes . includes ( i ) ) {
239
+ const signedByUser = result [ i ]
240
+ signedByUser && acc . push ( new Uint8Array ( Buffer . from ( signedByUser , 'base64' ) ) )
241
+ } else if ( returnGroup ) {
242
+ acc . push ( txn )
240
243
}
241
244
242
- if ( returnGroup ) {
243
- signedTxns . push ( transactions [ i ] ) ;
244
- }
245
-
246
- return signedTxns ;
247
- } , [ ] ) ;
245
+ return acc
246
+ } , [ ] )
248
247
249
248
return signedTxns ;
250
249
}
You can’t perform that action at this time.
0 commit comments