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

0.6.1 release #978

Merged
merged 40 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b21bd12
Add android play build from gitignore
TonyGiorgio Mar 19, 2024
146f87a
Remove part of the federation warning
TonyGiorgio Mar 19, 2024
e1843e6
refactor translations for easier editing
futurepaul Mar 7, 2024
ee32e59
Add error message for tor urls
benthecarman Mar 21, 2024
33b8190
new home
futurepaul Jan 13, 2024
52d89a2
rc5
futurepaul Mar 20, 2024
74a9f07
bump versions
futurepaul Mar 25, 2024
c9ebb64
Fix anonymous zaps
benthecarman Mar 25, 2024
3e02daa
cap sync
futurepaul Mar 25, 2024
7e863f4
fix profile editing and nsec deletion
futurepaul Mar 25, 2024
208f42f
Set inversion mode for scanner to 'both'
benthecarman Mar 23, 2024
b86b8cc
bring back 100k warning
futurepaul Mar 26, 2024
e276a1c
button cards that look like buttons
futurepaul Mar 26, 2024
18b71e8
better gap for back button
futurepaul Mar 26, 2024
2b2b514
simplify routes test
futurepaul Mar 26, 2024
014764f
add setup restore route, organize setup routes into folder
futurepaul Mar 26, 2024
e20bb9b
update to rc6
futurepaul Mar 26, 2024
d135c0d
Remove tos
TonyGiorgio Mar 26, 2024
8e1d07a
Change password renamed to security
TonyGiorgio Mar 26, 2024
91c65eb
Set pnpm version correctly in nix
TonyGiorgio Mar 26, 2024
e4d0287
Remove local storage npub
benthecarman Mar 26, 2024
e6352e5
Bump to rc7
benthecarman Mar 27, 2024
5f3695b
Mint discoverability
benthecarman Mar 8, 2024
5c814b6
recommend button stuff
futurepaul Mar 25, 2024
8c3572d
Remove invite codes
benthecarman Mar 27, 2024
71e53bf
I18n for new strings
benthecarman Mar 27, 2024
9bd968b
200k sat warning
futurepaul Mar 27, 2024
05a2022
Update src/routes/Receive.tsx
futurepaul Mar 27, 2024
9efe148
hide password for nsec input
futurepaul Mar 27, 2024
7650c04
Bump to rc9
benthecarman Mar 27, 2024
0c51e1b
Add lightning: prefix to ln addr qr code
benthecarman Mar 27, 2024
c5bec8b
bottom padding for chat messages on mobile
futurepaul Mar 27, 2024
787d89b
use different import profile page after setup
futurepaul Mar 27, 2024
04400c0
handle profile edit errors
futurepaul Mar 27, 2024
bd8e56c
Bump to v0.6.0
TonyGiorgio Mar 27, 2024
2a95f97
bump to 0.6.1
futurepaul Mar 28, 2024
0e3f7d7
add delete nostr profile ability
futurepaul Mar 28, 2024
f307be7
add unlink functionality, "delete" only shows for default keys
futurepaul Mar 28, 2024
46755a6
Create empty profile on skip for now
benthecarman Mar 28, 2024
678516a
Bump app versions to v0.6.1
TonyGiorgio Mar 29, 2024
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
10 changes: 2 additions & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ module.exports = {
rules: {
"@typescript-eslint/no-var-requires": "off" // Disable this specific rule for CJS files
}
},
{
files: ['src/i18n/**/translations.ts'],
rules: {
"internal-rules/check-i18n-keys": "off" //Disabled so no warnings are presented everytime pre-commit is run
}
},
}
],
parser: "@typescript-eslint/parser",
parserOptions: {
Expand All @@ -38,7 +32,7 @@ module.exports = {
jsx: true
}
},
plugins: ["@typescript-eslint", "solid", "import", "internal-rules"],
plugins: ["@typescript-eslint", "solid", "import"],
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
android/app/play/*

# Editor directories and files
.vscode/*
Expand All @@ -32,4 +33,4 @@ dev-dist
/playwright-report/
/playwright/.cache/

.env
.env
33 changes: 10 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,41 +131,28 @@ just i18n $lang

### Adding new languages or keys

1. In `src/i18n/` locate your desired language folder or create one if one does not exist
1. In `public/i18n/` locate your desired language .json file or create one if one does not exist

- When creating a new language dir ensure it follows the ISO 639 2-letter standard
- When creating a new language file ensure it follows the ISO 639 2-letter standard

2. In this folder create a file called `translations.ts`, this is where the translation keys for your desired language will be located
2. Populate your translation file with a translation object where all of the keys will be located

3. Populate your translation file with a translation object where all of the keys will be located

If you want to add Japanese you will create a file `/src/i18n/jp/translations.ts` and populate it with keys like so:
If you want to add Japanese you will create a file `/public/i18n/jp.json` and populate it with keys like so:

```
export default {
common: {
continue: "続ける",
{
"common": {
"continue": "続ける",
...
}
}
```

(You should compare your translations against the English language as all other languages are not the master and are likely deprecated)

4. Add your new translation file to the `/src/i18n/config.ts` so you can begin to see them in the app

```
import fa from "~/i18n/jp/translations.ts"

export const resources: {
...
jp: {
translations: jp
}
}
```
If you're using VS Code there are some nice extensions that can make this easier like i18n-ally and i18n-json-editor

5. Add your language to the `Language` object in `/src/utils/languages.ts`. This will allow you to select the language via the language selector in the UI. If your desired language is set as your primary language in your browser it will be selected automatically
3. Add your language to the `Language` object in `/src/utils/languages.ts`. This will allow you to select the language via the language selector in the UI. If your desired language is set as your primary language in your browser it will be selected automatically

```
export const LANGUAGE_OPTIONS: Language[] = [
Expand All @@ -175,4 +162,4 @@ export const LANGUAGE_OPTIONS: Language[] = [
},
```

6. That's it! You should now be able to see your translation keys populating the app in your desired language. When youre ready go ahead and open a PR to have you language merged for others!
4. That's it! You should now be able to see your translation keys populating the app in your desired language. When youre ready go ahead and open a PR to have you language merged for others!
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.mutinywallet.mutinywallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 51
versionName "0.5.10"
versionCode 53
versionName "0.6.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
1 change: 1 addition & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {
implementation project(':capacitor-share')
implementation project(':capacitor-status-bar')
implementation project(':capacitor-toast')
implementation project(':capacitor-secure-storage-plugin')

}

Expand Down
23 changes: 13 additions & 10 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@5.5.1_@capacitor+core@5.5.1/node_modules/@capacitor/android/capacitor')
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@5.7.4_@capacitor+core@5.7.4/node_modules/@capacitor/android/capacitor')

include ':capacitor-mlkit-barcode-scanning'
project(':capacitor-mlkit-barcode-scanning').projectDir = new File('../node_modules/.pnpm/@capacitor-mlkit+barcode-scanning@5.3.0_@capacitor+core@5.5.1/node_modules/@capacitor-mlkit/barcode-scanning/android')
project(':capacitor-mlkit-barcode-scanning').projectDir = new File('../node_modules/.pnpm/@capacitor-mlkit+barcode-scanning@5.4.0_@capacitor+core@5.7.4/node_modules/@capacitor-mlkit/barcode-scanning/android')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/.pnpm/@[email protected].6_@capacitor+core@5.5.1/node_modules/@capacitor/app/android')
project(':capacitor-app').projectDir = new File('../node_modules/.pnpm/@[email protected].7_@capacitor+core@5.7.4/node_modules/@capacitor/app/android')

include ':capacitor-app-launcher'
project(':capacitor-app-launcher').projectDir = new File('../node_modules/.pnpm/@[email protected].6_@capacitor+core@5.5.1/node_modules/@capacitor/app-launcher/android')
project(':capacitor-app-launcher').projectDir = new File('../node_modules/.pnpm/@[email protected].7_@capacitor+core@5.7.4/node_modules/@capacitor/app-launcher/android')

include ':capacitor-clipboard'
project(':capacitor-clipboard').projectDir = new File('../node_modules/.pnpm/@[email protected].6_@capacitor+core@5.5.1/node_modules/@capacitor/clipboard/android')
project(':capacitor-clipboard').projectDir = new File('../node_modules/.pnpm/@[email protected].7_@capacitor+core@5.7.4/node_modules/@capacitor/clipboard/android')

include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/.pnpm/@capacitor+filesystem@5.1.4_@capacitor+core@5.5.1/node_modules/@capacitor/filesystem/android')
project(':capacitor-filesystem').projectDir = new File('../node_modules/.pnpm/@capacitor+filesystem@5.2.1_@capacitor+core@5.7.4/node_modules/@capacitor/filesystem/android')

include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/.pnpm/@[email protected].6_@capacitor+core@5.5.1/node_modules/@capacitor/haptics/android')
project(':capacitor-haptics').projectDir = new File('../node_modules/.pnpm/@[email protected].7_@capacitor+core@5.7.4/node_modules/@capacitor/haptics/android')

include ':capacitor-share'
project(':capacitor-share').projectDir = new File('../node_modules/.pnpm/@[email protected].6_@capacitor+core@5.5.1/node_modules/@capacitor/share/android')
project(':capacitor-share').projectDir = new File('../node_modules/.pnpm/@[email protected].7_@capacitor+core@5.7.4/node_modules/@capacitor/share/android')

include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/.pnpm/@[email protected].6_@capacitor+core@5.5.1/node_modules/@capacitor/status-bar/android')
project(':capacitor-status-bar').projectDir = new File('../node_modules/.pnpm/@[email protected].7_@capacitor+core@5.7.4/node_modules/@capacitor/status-bar/android')

include ':capacitor-toast'
project(':capacitor-toast').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/toast/android')
project(':capacitor-toast').projectDir = new File('../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@capacitor/toast/android')

include ':capacitor-secure-storage-plugin'
project(':capacitor-secure-storage-plugin').projectDir = new File('../node_modules/.pnpm/[email protected]_@[email protected]/node_modules/capacitor-secure-storage-plugin/android')
43 changes: 21 additions & 22 deletions e2e/encrypt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
import { expect, test } from "@playwright/test";

import { loadHome, visitSettings } from "./utils";

test.beforeEach(async ({ page }) => {
await page.goto("http://localhost:3420/");
});

test("test local encrypt", async ({ page }) => {
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Mutiny Wallet/);

// Wait for an element matching the selector to appear in DOM.
await page.waitForSelector("text=0 SATS");

console.log("Page loaded.");

// Wait for a while just to make sure we can load everything
await page.waitForTimeout(1000);

// Navigate to settings
const settingsLink = await page.getByRole("link", { name: "Settings" });

settingsLink.click();

// Wait for settings to load
await page.waitForSelector("text=Settings");
await loadHome(page);
await visitSettings(page);

// Click the "Backup" link
await page.click("text=Backup");
Expand All @@ -48,6 +34,13 @@ test("test local encrypt", async ({ page }) => {
// Click the "I wrote down the words" button
await wroteDownButton.click();

// Make sure the balance box ready light is on
await page.locator("title=READY");

// Go back to settings / change password
await visitSettings(page);
await page.click("text=Security");

// The header should now say "Encrypt your seed words"
await expect(page.locator("h1")).toContainText(["Encrypt your seed words"]);

Expand All @@ -56,35 +49,41 @@ test("test local encrypt", async ({ page }) => {
const passwordInput = await page.locator(`input[name='password']`);

// 2. Type the password into the input field
await passwordInput.type("test");
await passwordInput.fill("test");

// 3. Find the input field with the name "confirmPassword"
const confirmPasswordInput = await page.locator(
`input[name='confirmPassword']`
);

// 4. Type the password into the input field
await confirmPasswordInput.type("test");
await confirmPasswordInput.fill("test");

// The "Encrypt" button should not be disabled
const encryptButton = await page.locator("button", { hasText: "Encrypt" });
await expect(encryptButton).not.toBeDisabled();

// wait 5 seconds for no reason (SADLY THIS IS IMPORTANT FOR THE TEST TO PASS)
await page.waitForTimeout(5000);

// Click the "Encrypt" button
await encryptButton.click();

// wait for a while just to see what happens
// await page.waitForTimeout(10000);

// Wait for a modal with the text "Enter your password"
await page.waitForSelector("text=Enter your password");

// Find the input field with the name "password"
const passwordInput2 = await page.locator(`input[name='password']`);

// Type the password into the input field
await passwordInput2.type("test");
await passwordInput2.fill("test");

// Click the "Decrypt Wallet" button
await page.click("text=Decrypt Wallet");

// Wait for an element matching the selector to appear in DOM.
await page.waitForSelector("text=0 SATS");
await page.locator(`text=0 sats`).first();
});
Loading
Loading