1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

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

This commit is contained in:
Niranjana Binoy 2022-02-14 13:29:24 -05:00 committed by GitHub
parent 2b1256faf4
commit b42e1f75fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -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),

View File

@ -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);

View File

@ -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();