Skip to content

Commit

Permalink
fix: validate address
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Feb 1, 2024
1 parent 7bcd601 commit f8f87ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/plugins/walletActions/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Wallet } from "zksync";
import { ZkSyncTransaction } from "zksync-checkout/build/types";
import { submitSignedTransactionsBatch } from "zksync/build/wallet";
import { TokenSymbol, Address } from "zksync/build/types";

import { screenAddress } from "@matterlabs/zksync-nuxt-core/utils/screening";
/**
* Transaction processing action
*
Expand Down Expand Up @@ -40,6 +40,13 @@ export const transactionBatch = async (
to: syncWallet.address(),
token: feeToken,
});

if (process.env.SCREENING_API_URL) {
await Promise.all([
...transactions.map((e) => screenAddress(e.to, process.env.SCREENING_API_URL!)),
store.dispatch("zk-account/screenAccountAddress", null, { root: true }),
]);
}
statusFunction("waitingUserConfirmation");
const batchTransactionData = await batchBuilder.build();
statusFunction("processing");
Expand Down

0 comments on commit f8f87ca

Please sign in to comment.