Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes namespace issue #123

Merged
merged 1 commit into from
Jun 24, 2024
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
2 changes: 1 addition & 1 deletion src/generateDapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export async function generateDapp(selection: Selections) {
await write(
".env",
Object.entries({
PROFILE_NAME: `${projectName}-${network}`,
PROJECT_NAME: projectName,
VITE_APP_NETWORK: network,
[`VITE_${assetType}_CREATOR_ADDRESS`]: "",
}).reduce((acc, [key, value]) => acc + `${key}=${value}` + "\n", "")
Expand Down
2 changes: 1 addition & 1 deletion templates/digital-asset-template/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async function init() {

await move.init({
network: process.env.VITE_APP_NETWORK,
profile: process.env.PROFILE_NAME,
profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`,
});
}
init();
2 changes: 1 addition & 1 deletion templates/digital-asset-template/scripts/move/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js");

const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8"));
const accountAddress =
config["profiles"][process.env.PROFILE_NAME]["account"];
config["profiles"][process.env.PROJECT_NAME]["account"];

async function compile() {
if (!process.env.VITE_COLLECTION_CREATOR_ADDRESS) {
Expand Down
4 changes: 2 additions & 2 deletions templates/digital-asset-template/scripts/move/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js");

const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8"));
const accountAddress =
config["profiles"][process.env.PROFILE_NAME]["account"];
config["profiles"][process.env.PROJECT_NAME]["account"];

async function publish() {
if (!process.env.VITE_COLLECTION_CREATOR_ADDRESS) {
Expand All @@ -29,7 +29,7 @@ async function publish() {
minter:
"0x3c41ff6b5845e0094e19888cba63773591be9de59cafa9e582386f6af15dd490",
},
profile: process.env.PROFILE_NAME,
profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`,
});
}
publish();
2 changes: 1 addition & 1 deletion templates/digital-asset-template/scripts/update_env.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require("dotenv").config();

const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8"));
const accountAddress =
config["profiles"][process.env.PROFILE_NAME]["account"];
config["profiles"][process.env.PROJECT_NAME]["account"];

const filePath = ".env";
let envContent = "";
Expand Down
2 changes: 1 addition & 1 deletion templates/fungible-asset-template/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async function init() {

await move.init({
network: process.env.VITE_APP_NETWORK,
profile: process.env.PROFILE_NAME,
profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`,
});
}
init();
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js");

const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8"));
const accountAddress =
config["profiles"][process.env.PROFILE_NAME]["account"];
config["profiles"][process.env.PROJECT_NAME]["account"];

async function compile() {
if (!process.env.VITE_FA_CREATOR_ADDRESS) {
Expand Down
4 changes: 2 additions & 2 deletions templates/fungible-asset-template/scripts/move/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js");

const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8"));
const accountAddress =
config["profiles"][process.env.PROFILE_NAME]["account"];
config["profiles"][process.env.PROJECT_NAME]["account"];

async function publish() {
if (!process.env.VITE_FA_CREATOR_ADDRESS) {
Expand All @@ -23,7 +23,7 @@ async function publish() {
// This is the address you want to use to create collection with, e.g. an address in Petra so you can create collection in UI using Petra
initial_creator_addr: process.env.VITE_FA_CREATOR_ADDRESS,
},
profile: process.env.PROFILE_NAME,
profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`,
});
}
publish();
2 changes: 1 addition & 1 deletion templates/fungible-asset-template/scripts/update_env.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require("dotenv").config();

const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8"));
const accountAddress =
config["profiles"][process.env.PROFILE_NAME]["account"];
config["profiles"][process.env.PROJECT_NAME]["account"];

const filePath = ".env";
let envContent = "";
Expand Down
Loading