Skip to content

Commit

Permalink
updated env
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor committed Jan 10, 2024
1 parent e896382 commit 1e8142d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NETWORK=stokenet # Options: mainnet or stokenet
DAPP_DEFINITION_ADDRESS=account_tdx_2_129kev9w27tsl7qjg0dlyze70kxnlzycs8v2c85kzec40gg8mt73f7y
NEXT_PUBLIC_NETWORK=stokenet # Options: mainnet or stokenet
NEXT_PUBLIC_DAPP_DEFINITION_ADDRESS=account_tdx_2_129kev9w27tsl7qjg0dlyze70kxnlzycs8v2c85kzec40gg8mt73f7y
4 changes: 0 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const nextConfig = {
reactStrictMode: false,

pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
env: {
NETWORK: process.env.NETWORK,
DAPP_DEFINITION_ADDRESS: process.env.DAPP_DEFINITION_ADDRESS,
},
};

module.exports = withMDX(nextConfig);
8 changes: 4 additions & 4 deletions src/app/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let subs: Subscription[] = [];

export function initializeSubscriptions(store: AppStore) {
let networkId;
switch (process.env.NETWORK) {
switch (process.env.NEXT_PUBLIC_NETWORK) {
case "mainnet":
networkId = RadixNetwork.Mainnet;
break;
Expand All @@ -40,8 +40,8 @@ export function initializeSubscriptions(store: AppStore) {
networkId = RadixNetwork.Stokenet;
}
rdtInstance = RadixDappToolkit({
dAppDefinitionAddress: process.env.DAPP_DEFINITION_ADDRESS
? process.env.DAPP_DEFINITION_ADDRESS
dAppDefinitionAddress: process.env.NEXT_PUBLIC_DAPP_DEFINITION_ADDRESS
? process.env.NEXT_PUBLIC_DAPP_DEFINITION_ADDRESS
: "",
networkId,
});
Expand All @@ -61,7 +61,7 @@ export function initializeSubscriptions(store: AppStore) {
// TODO: "black" on the light theme
rdtInstance.buttonApi.setTheme("white");
let network;
switch (process.env.NETWORK) {
switch (process.env.NEXT_PUBLIC_NETWORK) {
case "mainnet":
network = adex.ApiNetworkOptions.indexOf("mainnet");
break;
Expand Down

0 comments on commit 1e8142d

Please sign in to comment.