Skip to content
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
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Nami is a browser based wallet extension to interact with the Cardano blockchain. It's an open-source project and built by [**Berry Pool**](https://pipool.online).


### Testnet

[Download testnet version](./build.zip)
Expand Down Expand Up @@ -213,7 +212,12 @@ The `project_id` for API requests can be created under [blockfrost.io](https://b

**Recommended:** Follow this [approach](https://github.com/lxieyang/chrome-extension-boilerplate-react#secrets) in order to keep the keys seperate from the repository.

The quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET` and `secrets.PROJECT_ID_TESTNET` with the project ids from blockfrost.
```
# Update secrets file with your own keys
cp secrets.testing.js secrets.development.js
```

The quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET`, `secrets.PROJECT_ID_TESTNET`, `secrets.PROJECT_ID_PREVIEW` and `secrets.PROJECT_ID_PREPROD` with the project ids from blockfrost.

##### Requirements

Expand All @@ -222,12 +226,16 @@ The quick solution is to go under `./src/config/provider.js` and replace `secret
##### Start development server

```
# Update secrets file with your own keys
cp secrets.testing.js secrets.development.js
npm start
```

##### Create production build

```
# Update secrets file with your own keys
cp secrets.testing.js secrets.production.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, just saw the diff here ;)

npm run build
```

Expand Down
2 changes: 2 additions & 0 deletions secrets.testing.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default {
PROJECT_ID_MAINNET: 'DUMMY_MAINNET',
PROJECT_ID_TESTNET: 'DUMMY_TESTNET',
PROJECT_ID_PREVIEW: 'DUMMY_PREVIEW',
PROJECT_ID_PREPROD: 'DUMMY_PREPROD',
};
14 changes: 12 additions & 2 deletions utils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ delete config.chromeExtensionBoilerplate;

config.mode = 'production';

webpack(config, function (err) {
if (err) throw err;
webpack(config, function (err, stats) {
if (stats.hasErrors()) {
console.log(
stats.toString({
colors: true,
})
);
}

if (err) {
throw err;
}
});