Skip to content

Commit

Permalink
add saving new dk after rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Dec 9, 2024
1 parent 62c5ef1 commit 45ab74b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/e2e/api/veiledBalance.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

import path from "path";
import fs from "fs";
import {
AptosConfig,
Aptos,
Expand Down Expand Up @@ -39,6 +41,16 @@ describe("Veiled balance api", () => {

const INITIAL_APTOS_BALANCE = 0.5 * 10 ** 8;

const rootDir = path.resolve(__dirname, "../../../");

const addNewContentLineToFile = (filename: string, data: string) => {
const filePath = path.resolve(rootDir, filename);

const content = `\n# TESTNET_DK=${data}\n`;

fs.appendFileSync(filePath, content);
};

const mintFungibleTokens = async (account: Account) => {
const transaction = await aptos.transaction.build.simple({
sender: account.accountAddress,
Expand Down Expand Up @@ -428,6 +440,8 @@ describe("Veiled balance api", () => {
console.log("\n\n\n");
/* eslint-enable */

addNewContentLineToFile(".env.development", ALICE_NEW_VEILED_PRIVATE_KEY.toString());

expect(keyRotationAndUnfreezeTxResponse.success).toBeTruthy();
});

Expand Down

0 comments on commit 45ab74b

Please sign in to comment.