Open ilmoi opened 3 years ago
I'm using Drizzle inside of Vue (no vue-plugin, just pure Drizzle).
Following the docs on contract interaction I'm doing the following:
const stackId = await state .drizzle .drizzleInstance .contracts['ItemManager'] .methods['createItem'] .cacheSend(this.itemId, this.itemCost)
which successfully returns stackId. However when I try to retrieve the transaction from transaction stack:
stackId
if (state.transactionStack[stackId]) { const txHash = state.transactionStack[stackId] return state.transactions[txHash].status }
I get this error:
"TypeError: Cannot read property '0' of undefined"
Which I figured out is because transcationStack is missing from the state object. In fact the only things I have in state object are:
transcationStack
accounts: {...}, contracts: {...}, drizzle: {...},
and nothing else.
My end goal is to get the hash of the transction, like I can do with web3 code:
const ret_val = await state .drizzle .drizzleInstance .contracts['ItemManager'] .methods['createItem'](this.itemId, this.itemCost) .send()
but obviously without transactionStack being there I can't do so.
transactionStack
What am I missing? Am I doing something wrong or is there a bug somewhere? How can I get the state of the transaction?
I'm using Drizzle inside of Vue (no vue-plugin, just pure Drizzle).
Following the docs on contract interaction I'm doing the following:
which successfully returns
stackId
. However when I try to retrieve the transaction from transaction stack:I get this error:
Which I figured out is because
transcationStack
is missing from the state object. In fact the only things I have in state object are:and nothing else.
My end goal is to get the hash of the transction, like I can do with web3 code:
but obviously without
transactionStack
being there I can't do so.What am I missing? Am I doing something wrong or is there a bug somewhere? How can I get the state of the transaction?