Skip to content

Commit a3cee9f

Browse files
committed
fix: cache key should be account address
1 parent 8308320 commit a3cee9f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/server/routes/backend-wallet/sendTransaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export async function sendTransaction(fastify: FastifyInstance) {
8484
// Note: This is a temporary solution to cache the deployed address's factory for 7 days.
8585
// This is needed due to a potential race condition of submitting a transaction immediately after creating an account that is not yet mined onchain
8686
await redis.set(
87-
`account-factory:${chainId}:${validatedFactoryAddress.toLowerCase()}`,
88-
factoryAddress,
87+
`account-factory:${chainId}:${accountAddress.toLowerCase()}`,
88+
validatedFactoryAddress,
8989
"EX",
9090
7 * 24 * 60 * 60,
9191
);

src/server/routes/contract/write/write.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export async function writeToContract(fastify: FastifyInstance) {
7979
// Note: This is a temporary solution to cache the deployed address's factory for 7 days.
8080
// This is needed due to a potential race condition of submitting a transaction immediately after creating an account that is not yet mined onchain
8181
await redis.set(
82-
`account-factory:${chainId}:${validatedFactoryAddress.toLowerCase()}`,
83-
factoryAddress,
82+
`account-factory:${chainId}:${accountAddress.toLowerCase()}`,
83+
validatedFactoryAddress,
8484
"EX",
8585
7 * 24 * 60 * 60,
8686
);

0 commit comments

Comments
 (0)