Skip to content

Commit

Permalink
Merge branch 'master' into feat/transaction-list
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron committed Oct 30, 2023
2 parents 20bf68a + 8c37bb8 commit 3aea615
Show file tree
Hide file tree
Showing 11 changed files with 1,256 additions and 988 deletions.
8 changes: 0 additions & 8 deletions .swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,5 @@
"runtime": "automatic"
}
}
},
"env": {
"targets": [
"last 5 Chrome versions",
"last 5 Edge versions",
"last 5 Opera versions",
"last 5 Firefox versions"
]
}
}
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const swcConfig = {
},
target: "es2016",
},
env: {
targets: "",
},
};

// eslint-disable-next-line no-undef
Expand Down
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"prepare": "husky install"
},
"dependencies": {
"@bitcoin-design/bitcoin-icons-react": "^0.1.9",
"@bitcoin-design/bitcoin-icons-react": "^0.1.10",
"@bitcoinerlab/secp256k1": "^1.0.5",
"@getalby/sdk": "^2.5.0",
"@headlessui/react": "^1.7.16",
Expand All @@ -50,7 +50,7 @@
"bech32": "^2.0.0",
"bitcoinjs-lib": "^6.1.0",
"bolt11": "^1.4.1",
"crypto-js": "^4.1.1",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.9",
"dexie": "^3.2.4",
"elliptic": "^6.5.4",
Expand All @@ -72,7 +72,7 @@
"react-loading-skeleton": "^3.3.1",
"react-modal": "^3.16.1",
"react-qr-code": "^2.0.12",
"react-router-dom": "^6.14.2",
"react-router-dom": "^6.17.0",
"slip77": "^0.2.0",
"stream": "^0.0.2",
"tailwindcss": "^3.3.3",
Expand All @@ -81,67 +81,67 @@
"zustand": "^3.7.2"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@jest/types": "^29.6.1",
"@playwright/test": "^1.37.1",
"@swc/core": "^1.3.68",
"@swc/jest": "^0.2.27",
"@commitlint/cli": "^17.8.0",
"@commitlint/config-conventional": "^17.8.0",
"@jest/types": "^29.6.3",
"@playwright/test": "^1.39.0",
"@swc/core": "^1.3.92",
"@swc/jest": "^0.2.29",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/chrome": "^0.0.243",
"@types/crypto-js": "^4.1.1",
"@types/elliptic": "^6.4.14",
"@types/lodash.merge": "^4.6.7",
"@types/lodash.pick": "^4.4.0",
"@types/lodash.snakecase": "^4.1.1",
"@types/pubsub-js": "^1.8.3",
"@types/react-dom": "^18.2.7",
"@types/react-modal": "^3.16.0",
"@types/uuid": "^9.0.2",
"@types/webextension-polyfill": "^0.10.1",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"autoprefixer": "^10.4.15",
"@testing-library/user-event": "^14.5.1",
"@trivago/prettier-plugin-sort-imports": "^4.2.1",
"@types/chrome": "^0.0.248",
"@types/crypto-js": "^4.1.3",
"@types/elliptic": "^6.4.16",
"@types/lodash.merge": "^4.6.8",
"@types/lodash.pick": "^4.4.8",
"@types/lodash.snakecase": "^4.1.8",
"@types/pubsub-js": "^1.8.5",
"@types/react-dom": "^18.2.13",
"@types/react-modal": "^3.16.2",
"@types/uuid": "^9.0.6",
"@types/webextension-polyfill": "^0.10.5",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"autoprefixer": "^10.4.16",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
"complete-randomer": "^1.9.1",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"del-cli": "^5.0.0",
"eslint": "^8.47.0",
"del-cli": "^5.1.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"fake-indexeddb": "^4.0.1",
"filemanager-webpack-plugin": "^8.0.0",
"html-webpack-plugin": "^5.5.3",
"husky": "^8.0.3",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-webextension-mock": "^3.8.9",
"lint-staged": "^13.3.0",
"lint-staged": "^15.0.2",
"mini-css-extract-plugin": "^2.7.6",
"msw": "^1.3.1",
"msw": "^1.3.2",
"postcss": "^8.4.31",
"postcss-cli": "^10.1.0",
"postcss-loader": "^7.3.3",
"pptr-testing-library": "^0.7.0",
"prettier": "^3.0.1",
"process": "^0.11.10",
"puppeteer": "^21.0.3",
"puppeteer": "^21.3.6",
"stream-browserify": "^3.0.0",
"swc-loader": "^0.2.3",
"tailwindcss-3d": "^1.0.0",
"tailwindcss-3d": "^1.0.2",
"terser-webpack-plugin": "^5.3.9",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.2.2",
"webpack": "^5.88.2",
"webpack-bundle-analyzer": "^4.9.0",
"webpack": "^5.89.0",
"webpack-bundle-analyzer": "^4.9.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-sources": "^3.2.3",
Expand Down
14 changes: 7 additions & 7 deletions src/app/components/Badge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { useTranslation } from "react-i18next";
import { classNames } from "~/app/utils";

type Props = {
label: "budget" | "auth" | "imported";
color: string;
textColor: string;
small?: boolean;
className: string;
};

export default function Badge({ label, color, textColor, small }: Props) {
export default function Badge({ label, className }: Props) {
const { t: tComponents } = useTranslation("components", {
keyPrefix: "badge",
});

return (
<span
className={`inline-block leading-none rounded-full font-medium mr-2 py-1 bg-${color} text-${textColor} ${
!small ? "px-2 text-xs" : "px-1.5 text-xxxs"
}`}
className={classNames(
"inline-block leading-none rounded-full font-medium mr-2 py-1 px-2 text-xs",
className
)}
>
{tComponents(`label.${label}`)}
</span>
Expand Down
15 changes: 3 additions & 12 deletions src/app/components/BadgesList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,20 @@ export default function BadgesList({ allowance }: Props) {
if (allowance.remainingBudget > 0) {
badges.push({
label: "budget",
color: "green-bitcoin",
textColor: "white",
className: "bg-blue-500 text-white",
});
}
if (allowance.lnurlAuth) {
badges.push({
label: "auth",
color: "green-bitcoin",
textColor: "white",
className: "bg-green-bitcoin text-white",
});
}

return (
<>
{badges?.map((b) => {
return (
<Badge
key={b.label}
label={b.label}
color={b.color}
textColor={b.textColor}
/>
);
return <Badge key={b.label} label={b.label} className={b.className} />;
})}
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/onboard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ClockIcon,
InfoCircleIcon,
TwoKeysIcon,
} from "@bitcoin-design/bitcoin-icons-react/outline";
import { useTranslation } from "react-i18next";
Expand All @@ -9,7 +10,6 @@ import PublisherCard from "~/app/components/PublisherCard";
import ScreenHeader from "~/app/components/ScreenHeader";
import { useAccount } from "~/app/context/AccountContext";
import { useNavigationState } from "~/app/hooks/useNavigationState";
import InfoCircleIcon from "~/app/icons/InfoCircleIcon";
import { NO_KEYS_ERROR, USER_REJECTED_ERROR } from "~/common/constants";
import api from "~/common/lib/api";
import msg from "~/common/lib/msg";
Expand Down
21 changes: 0 additions & 21 deletions src/app/icons/InfoCircleIcon.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions src/app/screens/Accounts/Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ function AccountDetail() {
<div className="">
<Badge
label="imported"
color="green-bitcoin"
textColor="white"
className="bg-green-bitcoin text-white"
/>
</div>
)}
Expand Down
12 changes: 12 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@
],
"default_title": "Alby - Bitcoin Lightning Wallet"
},
"commands": {
"__chrome___execute_action": {
"suggested_key": {
"default": "Alt+Shift+A"
}
},
"__firefox___execute_browser_action": {
"suggested_key": {
"default": "Alt+Shift+A"
}
}
},
"options_ui": {
"page": "options.html",
"open_in_tab": true,
Expand Down
3 changes: 1 addition & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,7 @@ export interface SettingsStorage {

export interface Badge {
label: "budget" | "auth" | "imported";
color: string;
textColor: string;
className: string;
}

export interface Publisher
Expand Down
Loading

0 comments on commit 3aea615

Please sign in to comment.