0

I try to make a stake with polkadot js api. Here is my commands:

const info = await api.tx.staking
                    .bond(amount, {Controller: receiver})
                    .paymentInfo(sender); 
const bondTx = api.tx.staking.bond(stenToUnits(amount), {Controller: receiver});
const unsub = await bondTx.signAndSend(senderPair);
await waitUntilFinalized(unsub);
const nominationTx = api.tx.staking.nominate([nominatingValidators[0]]);
await nominationTx.signAndSend(senderPair);`

But I get an error:

RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1014: Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.....
index.js:19 Uncaught (in promise) k: 1014: Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.

What am I doing wrong? How to fix this?

1 Answer 1

1

The error Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool. means that there is already a transaction in the queue with that nonce.

You can manually set the nonce in the signAndSend method like in this example: How to use polkadot-api to send multiple transactions simultaneously?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.