fix errors when creating tx in safe v1.0.0

- Code was expecting `ExecutionSuccess` event. That's not part of v1.0.0
- `transactionHash` is part of the tx receipt, so no need to extract it from the event
- `safeTxHash` is calculated client-side, so no longer needed to get it from tx receipt
This commit is contained in:
fernandomg 2020-06-03 10:34:31 -03:00
parent 8e75e999ef
commit 02bb5211a7
2 changed files with 2 additions and 4 deletions

View File

@ -219,8 +219,7 @@ const createTransaction = ({
const toStoreTx = isExecution const toStoreTx = isExecution
? mockedTx.withMutations((record) => { ? mockedTx.withMutations((record) => {
record record
.set('executionTxHash', receipt.events.ExecutionSuccess.transactionHash) .set('executionTxHash', receipt.transactionHash)
.set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash)
.set('executor', from) .set('executor', from)
.set('isExecuted', true) .set('isExecuted', true)
.set('isSuccessful', receipt.status) .set('isSuccessful', receipt.status)

View File

@ -157,8 +157,7 @@ const processTransaction = ({
const toStoreTx = isExecution const toStoreTx = isExecution
? mockedTx.withMutations((record) => { ? mockedTx.withMutations((record) => {
record record
.set('executionTxHash', receipt.events.ExecutionSuccess.transactionHash) .set('executionTxHash', receipt.transactionHash)
.set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash)
.set('blockNumber', receipt.blockNumber) .set('blockNumber', receipt.blockNumber)
.set('executionDate', record.submissionDate) .set('executionDate', record.submissionDate)
.set('executor', from) .set('executor', from)