When calling prepareTransactions from base-relayer for the first transactions of an undeployed sequence wallet, this error was thrown
Uncaught Error: Unable to prepare transactions without a defined nonce
My approach was that I firstly signed the txns using wallet.signTransactions and then passed the attributes from the signed Transactions to prepareTransactions.
I found the issue was in these LOC
const nonce = readSequenceNonce(...transactions)
if (!nonce) {
throw new Error('Unable to prepare transactions without a defined nonce')
}
The transaction produced by signTransactions has the nonce of 0 instead of BigNumber { 0x0 } hence this check !nonce is true for both undefined and 0 values.
How can I do differently to use this prepareTransactions for the first txns?
When calling
prepareTransactionsfrom base-relayer for the first transactions of an undeployed sequence wallet, this error was thrownMy approach was that I firstly signed the txns using
wallet.signTransactionsand then passed the attributes from the signed Transactions toprepareTransactions.I found the issue was in these LOC
The transaction produced by signTransactions has the nonce of
0instead ofBigNumber { 0x0 }hence this check!nonceis true for bothundefinedand0values.How can I do differently to use this
prepareTransactionsfor the first txns?