Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions frontend/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ ErrorLog /proc/self/fd/2
#
LogLevel warn

<IfModule mod_headers.c>
Header always set Cross-Origin-Opener-Policy "same-origin"
Header always set Cross-Origin-Embedder-Policy "require-corp"
</IfModule>

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import {
BENCHMARKS_WALLETS_CHANGE_AMOUNT,
BENCHMARKS_WALLETS_CHANGE_FEE, BENCHMARKS_WALLETS_CHANGE_FEE_ZKAPPS,
BENCHMARKS_WALLETS_CHANGE_TRANSACTION_BATCH, BENCHMARKS_WALLETS_CHANGE_ZKAPPS_BATCH,
BENCHMARKS_WALLETS_CHANGE_FEE,
BENCHMARKS_WALLETS_CHANGE_FEE_ZKAPPS,
BENCHMARKS_WALLETS_CHANGE_TRANSACTION_BATCH,
BENCHMARKS_WALLETS_CHANGE_ZKAPPS_BATCH,
BENCHMARKS_WALLETS_CLOSE,
BENCHMARKS_WALLETS_GET_ALL_TXS_SUCCESS,
BENCHMARKS_WALLETS_GET_WALLETS,
BENCHMARKS_WALLETS_GET_WALLETS_SUCCESS,
BENCHMARKS_WALLETS_SELECT_WALLET,
BENCHMARKS_WALLETS_SEND_TX_SUCCESS,
BENCHMARKS_WALLETS_SEND_TXS, BENCHMARKS_WALLETS_SEND_ZKAPPS,
BENCHMARKS_WALLETS_SEND_TXS,
BENCHMARKS_WALLETS_SEND_ZKAPPS,
BENCHMARKS_WALLETS_TOGGLE_RANDOM_WALLET,
BENCHMARKS_WALLETS_UPDATE_WALLETS_SUCCESS,
BenchmarksWalletsActions,
Expand Down Expand Up @@ -278,16 +281,14 @@ export function reducer(state: BenchmarksWalletsState = initialState, action: Be
const nonce = getNonceForWallet(wallet, state).toString();
const counter = state.sentTxCount + i;
const memo = 'S.T.' + Date.now() + ',' + (counter + 1) + ',' + localStorage.getItem('browserId');
const payment = {
return {
payerPublicKey: wallet.publicKey,
payerPrivateKey: wallet.privateKey,
fee: state.sendingFeeZkapps,
nonce,
memo,
accountUpdates: 1,
};

return payment;
});
} else {
const wallet = state.activeWallet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4106,34 +4106,37 @@ export class BenchmarksWalletsService {
}

private mapTxPoolResponse(response: Array<[MempoolTransactionResponseKind, SignedCommand | ZkappCommand]>): MempoolTransaction[] {
// return response
// .filter(tx => !!any(tx).SignedCommand)
// .map(tx => tx as { SignedCommand: SignedCommand })
// .map((tx: { SignedCommand: SignedCommand }) => ({
// kind: MempoolTransactionKind.PAYMENT,
// sender: tx.SignedCommand.payload.common.fee_payer_pk,
// fee: Number(tx.SignedCommand.payload.common.fee),
// nonce: Number(tx.SignedCommand.payload.common.nonce),
// memo: removeUnicodeEscapes(tx.SignedCommand.payload.common.memo),
// transactionData: tx.SignedCommand,
// sentFromStressingTool: tx.SignedCommand.payload.common.memo.includes('S.T.'),
// sentByMyBrowser: tx.SignedCommand.payload.common.memo.includes(localStorage.getItem('browserId')),
// } as MempoolTransaction));
return response
.filter(tx => tx[0] === MempoolTransactionResponseKind.SignedCommand)
.map(tx => tx[1] as SignedCommand)
.map((tx: SignedCommand) => {
const memo = decodeMemo(tx.payload.common.memo);
return {
kind: MempoolTransactionKind.PAYMENT,
sender: tx.payload.common.fee_payer_pk,
fee: Number(tx.payload.common.fee),
nonce: Number(tx.payload.common.nonce),
memo: removeUnicodeEscapes(memo),
transactionData: tx,
sentFromStressingTool: memo.includes('S.T.'),
sentByMyBrowser: memo.includes(localStorage.getItem('browserId')),
} as MempoolTransaction;
.map(([kind, command]: [MempoolTransactionResponseKind, SignedCommand | ZkappCommand]) => {
switch (kind) {
case MempoolTransactionResponseKind.SignedCommand:
const tx = command as SignedCommand;
const memo = decodeMemo(tx.payload.common.memo);
return {
kind: MempoolTransactionKind.PAYMENT,
sender: tx.payload.common.fee_payer_pk,
fee: Number(tx.payload.common.fee),
nonce: Number(tx.payload.common.nonce),
memo: removeUnicodeEscapes(memo),
transactionData: tx,
sentFromStressingTool: memo.includes('S.T.'),
sentByMyBrowser: memo.includes(localStorage.getItem('browserId')),
} as MempoolTransaction;
case MempoolTransactionResponseKind.ZkappCommand:
const zkTx = command as ZkappCommand;
const zkMemo = decodeMemo(zkTx.memo);
return {
kind: MempoolTransactionKind.ZK_APP,
sender: zkTx.fee_payer.body.public_key,
fee: Number(zkTx.fee_payer.body.fee),
nonce: Number(zkTx.fee_payer.body.nonce),
memo: removeUnicodeEscapes(zkMemo),
transactionData: zkTx,
sentFromStressingTool: zkMemo.includes('S.T.'),
sentByMyBrowser: zkMemo.includes(localStorage.getItem('browserId')),
} as MempoolTransaction;
}

});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BlockProductionOverviewSlotDetailsComponent extends StoreDispatcher

private listenToActiveNode(): void {
this.select(AppSelectors.activeNodeDetails, (node: AppNodeDetails) => {
this.minaExplorer = node.network.toLowerCase();
this.minaExplorer = node.network?.toLowerCase();
}, filter(Boolean));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class BlockProductionWonSlotsSidePanelComponent extends StoreDispatcher i

private listenToActiveNode(): void {
this.select(AppSelectors.activeNodeDetails, (node: AppNodeDetails) => {
this.minaExplorer = node.network.toLowerCase();
this.minaExplorer = node.network?.toLowerCase();
}, filter(Boolean));
}

Expand Down
1 change: 1 addition & 0 deletions frontend/src/assets/environments/staging.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
'benchmarks': ['wallets'],
},
canAddNodes: false,
graphQL: 'http://adonagy.hz.minaprotocol.network:3000/graphql'
},
configs: [
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const environment: Readonly<MinaEnv> = {
zk: ['test'],
},
canAddNodes: true,
graphQL: 'https://api.minascan.io/node/devnet/v1/graphql',
graphQL: 'http://adonagy.hz.minaprotocol.network:3000/graphql',
},
configs: [
// {
Expand Down
Loading