File tree 1 file changed +8
-2
lines changed
packages/react-hook/src/lib
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,18 @@ export function WalletSelectorProvider({
237
237
* @returns {Promise<Transaction[]> } - the resulting transactions
238
238
*/
239
239
const signAndSendTransactions = useCallback (
240
- ( { transactions } : { transactions : Array < Transaction > } ) => {
240
+ async ( { transactions } : { transactions : Array < Transaction > } ) => {
241
241
if ( ! wallet ) {
242
242
throw new WalletError ( "No wallet connected" ) ;
243
243
}
244
244
245
- return wallet . signAndSendTransactions ( { transactions } ) ;
245
+ const sentTxs = ( await wallet . signAndSendTransactions ( {
246
+ transactions,
247
+ } ) ) as Array < FinalExecutionOutcome > ;
248
+
249
+ return sentTxs . map ( ( tx : FinalExecutionOutcome ) =>
250
+ providers . getTransactionLastResult ( tx )
251
+ ) ;
246
252
} ,
247
253
[ wallet ]
248
254
) ;
You can’t perform that action at this time.
0 commit comments