Closed joefitter closed 1 year ago
Hi - this is when using the walletAdpater like so:
const wallet = useWallet()
const umi = createUmi(endpoint, rpcOptions)
.use(walletAdapterIdentity(wallet))
.use(mplTokenMetadata())
Further to this - it appears the transactionBuilder.isSmallEnough getter returns true for the instructions although when built they result in a transaction that's too large.
Does this method take signers, blockhash etc into account?
Hi there,
The encoding overruns UInt8Array
error occurs because one of the transaction is too large so your latest comment is very relevant.
The methods that compute transaction sizes compile and serialise transactions as if they were going to be sent which means they do take everything into account including blockhash and signers.
All I can think of is you are setting the blockhash after splitting them by transaction size so there could be a discrepancy here. Although the method that compute the size should allocate a mock blockhash when missing to accommodate for that.
Also note that there is a unsafeSplitByTransactionSize
on the transaction builder that does more or less what you are trying to achieve.
Hey Joe, I'm closing this since it's been a while but feel free to reopen if/when necessary. 🙏
Umi version
0.7.5
Code
Error