Skip to content

Commit

Permalink
Merge pull request #2 from lemois-1337/main
Browse files Browse the repository at this point in the history
Fix CI tests, lints and workflows
  • Loading branch information
lemois-1337 authored Sep 20, 2024
2 parents 80c6dd2 + a129573 commit f9401da
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 8,206 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 18
uses: actions/setup-node@v4

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
run: npm ci
run: |
npm install
npm ci
- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
prettier_args: "--check './**/*.{js,jsx,ts,tsx,css,json}' --config ./.prettierrc"
- name: Run ESlint
run: |
node_modules/.bin/eslint --config ./.eslintrc.json ./app/ ./components/ ./lib/ ./tests/
- name: Run Prettier
run: |
node_modules/.bin/prettier --config ./.prettierrc --check './{app,components,lib,tests}/*.{js,jsx,ts,tsx,css,json}'
10 changes: 5 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Run Unit Tests

on: [push]
on:
push:
pull_request:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- run: npm install
- run: npm ci
- run: npm test
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ KarlsenVault is a simple frontend interface for your Ledger device.

## Compatible Browsers

The browser needs to support WebUSB/WebHID so it can interact with the Ledger device. These are the known compatible browsers:
The browser needs to support WebUSB/WebHID so it can interact with
the Ledger device. These are the known compatible browsers:

- Edge
- Chrome

Expand All @@ -18,10 +20,14 @@ First, run the development server:
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to start using or developing KarlsenVault locally.
Open [http://localhost:3000](http://localhost:3000) with your
browser to start using or developing KarlsenVault locally.

## FAQ

### Are my funds safe with KarlsenVault?

Yes, but to be clear KarlsenVault itself does not store your Karlsen. Your Karlsen is also not stored in the Ledger device as well. When you send karlsen to the address you generate with KarlsenVault, it is stored on the blockdag as a UTXO.
Yes, but to be clear KarlsenVault itself does not store your
Karlsen. Your Karlsen is also not stored in the Ledger device as
well. When you send Karlsen (KLS) to the address you generate with
KarlsenVault, it is stored on the BlockDAG as a UTXO.
1 change: 0 additions & 1 deletion app/page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@
}
}


.tooltip {
position: relative;
}
Expand Down
66 changes: 52 additions & 14 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ async function getAppData(router, deviceType = 'usb') {
}
}

const WHITELIST = [
'vault.karlsencoin.com',
];
const WHITELIST = ['vault.karlsencoin.com'];

export default function Home() {
const router = useRouter();
Expand All @@ -90,11 +88,11 @@ export default function Home() {
setIsShowDemo(window.location.hostname !== 'karlsenvault.io');

fetch('https://api.github.com/repos/karlsen-network/karlsenvault/commits/main')
.then(response => response.json())
.then(data => {
.then((response) => response.json())
.then((data) => {
setCommitHash(data.sha.substring(0, 7));
})
.catch(error => console.error('Error fetching commit hash:', error));
.catch((error) => console.error('Error fetching commit hash:', error));
}, []);

const smallStyles = width <= 48 * 16 ? { fontSize: '1rem' } : {};
Expand Down Expand Up @@ -157,16 +155,56 @@ export default function Home() {
</Group>

<footer style={{ textAlign: 'center', marginTop: '2rem' }}>
<p className="fs-5" style={{ color: 'white', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
Made with <span style={{ color: 'red', margin: '0 0.5rem' }}></span> by Kaspa and Karlsen developers
<a href="https://github.com/karlsen-network/karlsenvault" target="_blank" rel="noopener noreferrer" className={styles.tooltip} title="Source code">
<FaGithub style={{ marginLeft: '0.5rem', width: '20.8px', height: '20.8px', color: 'white' }} />
<p
className='fs-5'
style={{
color: 'white',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
Made with <span style={{ color: 'red', margin: '0 0.5rem' }}></span> by Kaspa
and Karlsen developers
<a
href='https://github.com/karlsen-network/karlsenvault'
target='_blank'
rel='noopener noreferrer'
className={styles.tooltip}
title='Source code'
>
<FaGithub
style={{
marginLeft: '0.5rem',
width: '20.8px',
height: '20.8px',
color: 'white',
}}
/>
</a>
<a href="https://explorer.karlsencoin.com/addresses/karlsen:qqe3p64wpjf5y27kxppxrgks298ge6lhu6ws7ndx4tswzj7c84qkjlrspcuxw" target="_blank" rel="noopener noreferrer" className={styles.tooltip} title="Donation address">
<BiDonateHeart style={{ marginLeft: '0.5rem', width: '20.8px', height: '20.8px', color: 'white' }} />
<a
href='https://explorer.karlsencoin.com/addresses/karlsen:qqe3p64wpjf5y27kxppxrgks298ge6lhu6ws7ndx4tswzj7c84qkjlrspcuxw'
target='_blank'
rel='noopener noreferrer'
className={styles.tooltip}
title='Donation address'
>
<BiDonateHeart
style={{
marginLeft: '0.5rem',
width: '20.8px',
height: '20.8px',
color: 'white',
}}
/>
</a>
&nbsp;&nbsp;|&nbsp;&nbsp; Build version:
<a href={`https://github.com/karlsen-network/karlsenvault/commit/${commitHash}`} target="_blank" rel="noopener noreferrer" style={{ color: 'lightgray', marginLeft: '0.5rem' }}>
&nbsp;&nbsp;|&nbsp;&nbsp; Build version:
<a
href={`https://github.com/karlsen-network/karlsenvault/commit/${commitHash}`}
target='_blank'
rel='noopener noreferrer'
style={{ color: 'lightgray', marginLeft: '0.5rem' }}
>
{commitHash}
</a>
</p>
Expand Down
Loading

0 comments on commit f9401da

Please sign in to comment.