Include transactions from all networks in state logs (#13599)

feature/default_network_editable
Niranjana Binoy 3 years ago committed by GitHub
parent 2b1256faf4
commit b42e1f75fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/scripts/metamask-controller.js
  2. 9
      ui/index.js
  3. 4
      ui/store/actions.js

@ -1325,6 +1325,7 @@ export default class MetamaskController extends EventEmitter {
createTransactionEventFragment: txController.createTransactionEventFragment.bind(
txController,
),
getTransactions: txController.getTransactions.bind(txController),
// messageManager
signMessage: this.signMessage.bind(this),

@ -183,10 +183,13 @@ function maskObject(object, mask) {
}
function setupDebuggingHelpers(store) {
window.getCleanAppState = function () {
window.getCleanAppState = async function () {
const state = clone(store.getState());
state.version = global.platform.getVersion();
state.browser = window.navigator.userAgent;
state.completeTxList = await actions.getTransactions({
filterToCurrentNetwork: false,
});
return state;
};
window.getSentryState = function () {
@ -200,8 +203,8 @@ function setupDebuggingHelpers(store) {
};
}
window.logStateString = function (cb) {
const state = window.getCleanAppState();
window.logStateString = async function (cb) {
const state = await window.getCleanAppState();
global.platform.getPlatformInfo((err, platform) => {
if (err) {
cb(err);

@ -751,6 +751,10 @@ export function updateAndApproveTx(txData, dontShowLoadingIndicator) {
};
}
export async function getTransactions(filters = {}) {
return await promisifiedBackground.getTransactions(filters);
}
export function completedTx(id) {
return (dispatch, getState) => {
const state = getState();

Loading…
Cancel
Save