You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue when using the Polkadot JS API to handle batch transactions. In the normal case, when I call individual functions, I receive multiple status updates such as Ready, Broadcast, InBlock, and Finalized. However, when I aggregate these individual transactions into an array and pass them to the batchAll function, the callback only returns Ready and Broadcast status. This makes it challenging to determine whether the entire batch failed or succeeded.
Problem:
When using the batchAll function, the callback only provides Ready and Broadcast status.
It is difficult to identify whether the batch of transactions failed or succeeded within the callback function.
Scenario:
Each transaction in the batch calls a different function.
The goal is to notify users about the success or failure of their transactions.
A single wallet is used for multiple users.
Desired Solution:
Need a way to check if the batch of transactions failed or succeeded within the callback function.
Information about the block status or any relevant details to identify the success or failure of the batch would be helpful.
Additional Context:
I am currently maintaining a separate array for the same transactions in a different batch to notify users based on the transactions they have in batch.
Code:
`const dex = await api.rpc.system.accountNextIndex(
REGISTRAR_KEYRING.address,
);
const result = await api.tx.utility
.batchAll(array)
.signAndSend(REGISTRAR_KEYRING, { nonce: dex }, ({ status, events }) => {
console.log('Status:', status.toHuman());
console.log('Is events:', events);
if (status.isInBlock || status.isFinalized) {
console.log('Transaction Included in Block or Finalized');
}
// Need a way to determine if the batch failed or succeeded.
// Additional information about the block status would be helpful.
});`
output:
The text was updated successfully, but these errors were encountered:
Description:
I am facing an issue when using the Polkadot JS API to handle batch transactions. In the normal case, when I call individual functions, I receive multiple status updates such as Ready, Broadcast, InBlock, and Finalized. However, when I aggregate these individual transactions into an array and pass them to the batchAll function, the callback only returns Ready and Broadcast status. This makes it challenging to determine whether the entire batch failed or succeeded.
Problem:
When using the batchAll function, the callback only provides Ready and Broadcast status.
It is difficult to identify whether the batch of transactions failed or succeeded within the callback function.
Scenario:
Each transaction in the batch calls a different function.
The goal is to notify users about the success or failure of their transactions.
A single wallet is used for multiple users.
Desired Solution:
Need a way to check if the batch of transactions failed or succeeded within the callback function.
Information about the block status or any relevant details to identify the success or failure of the batch would be helpful.
Additional Context:
I am currently maintaining a separate array for the same transactions in a different batch to notify users based on the transactions they have in batch.
Code:
output:

The text was updated successfully, but these errors were encountered: