From fbc72d3cc946a86bd2f4f8f20a014b588e443521 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Thu, 23 May 2019 13:51:33 +0300 Subject: [PATCH] RPC Error hotfix (when changing accounts) --- app/src/redux/sagas/transactionsSaga.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/redux/sagas/transactionsSaga.js b/app/src/redux/sagas/transactionsSaga.js index b39f944..dabdf91 100644 --- a/app/src/redux/sagas/transactionsSaga.js +++ b/app/src/redux/sagas/transactionsSaga.js @@ -4,13 +4,15 @@ import { drizzle } from '../../index'; import { orbitSagaPut } from '../../utils/orbitUtils'; import { DRIZZLE_UTILS_SAGA_INITIALIZED } from '../actions/drizzleUtilsActions'; import { CONTRACT_EVENT_FIRED } from './eventSaga'; +import { getCurrentAccount } from './drizzleUtilsSaga'; const transactionsHistory = Object.create(null); function* initTransaction(action) { + const account = yield call(getCurrentAccount); const dataKey = drizzle.contracts[action.transactionDescriptor.contract] .methods[action.transactionDescriptor.method].cacheSend( - ...(action.transactionDescriptor.params) + ...action.transactionDescriptor.params, { from: account } ); transactionsHistory[dataKey] = action; transactionsHistory[dataKey].state = 'initialized';