Skip to content

Commit dffb702

Browse files
authored
localWallet to save the data post import (#146)
1 parent 48553c5 commit dffb702

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/utils/wallets/importLocalWallet.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { LocalWallet } from "@thirdweb-dev/wallets";
2+
import { LocalFileStorage, env } from "../../../core";
23
import { createWalletDetails } from "../../../src/db/wallets/createWalletDetails";
34
import { WalletType } from "../../../src/schema/wallet";
45

@@ -45,6 +46,12 @@ export const importLocalWallet = async (
4546
break;
4647
}
4748

49+
await wallet.save({
50+
strategy: "encryptedJson",
51+
password: env.THIRDWEB_API_SECRET_KEY,
52+
storage: new LocalFileStorage(walletAddress),
53+
});
54+
4855
await createWalletDetails({
4956
address: walletAddress,
5057
type: WalletType.local,

0 commit comments

Comments
 (0)