Small refactor to support mocking RBF txs

This commit is contained in:
Felipe Knorr Kuhn 2021-12-14 23:16:13 -08:00
parent bc7bbf5fe5
commit 0af5d733c4
No known key found for this signature in database
GPG Key ID: 79619B52BB097C1A

View File

@ -68,7 +68,13 @@ export const emitMempoolInfo = ({
//TODO: Use network specific mocks
case "signet":
case "testnet":
case "mainnet":
default:
break;
}
switch (params.command) {
case "init": {
win.mockSocket.send('{"action":"init"}');
win.mockSocket.send('{"action":"want","data":["blocks","stats","mempool-blocks","live-2h-chart"]}');
win.mockSocket.send('{"conversions":{"USD":32365.338815782445}}');
@ -78,6 +84,16 @@ export const emitMempoolInfo = ({
cy.readFile('cypress/fixtures/mainnet_mempoolInfo.json', 'ascii').then((fixture) => {
win.mockSocket.send(JSON.stringify(fixture));
});
break;
}
case "rbfTransaction": {
cy.readFile('cypress/fixtures/mainnet_rbf.json', 'ascii').then((fixture) => {
win.mockSocket.send(JSON.stringify(fixture));
});
break;
}
default:
break;
}
});
cy.waitForSkeletonGone();