Skip to content

Commit

Permalink
Merge branch 'master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Feb 2, 2023
2 parents f624f63 + 35862ca commit 1acacba
Show file tree
Hide file tree
Showing 112 changed files with 3,582 additions and 2,257 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Alby is open-source and currently in alpha stage. Our goal is to create the best

We have a channel on the [bitcoin.design](https://bitcoin.design/) Slack community [#lightning-browser-extension](https://bitcoindesign.slack.com/archives/C02591ADXM2) and a [Telegram group](https://t.me/getAlby). Come and join us!

We also do a bi-weekly call on Thursday at [13:00 UTC](https://everytimezone.com/s/436cf0d2) on [Jitsi](https://meet.fulmo.org/AlbyCommunityCall)
We also do a bi-weekly call on Thursday at [15:00 UTC](https://everytimezone.com/s/436cf0d2) on [Jitsi](https://meet.fulmo.org/AlbyCommunityCall)

## Browser Support

Expand Down
5 changes: 5 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import "@testing-library/jest-dom";
// https://github.com/mswjs/examples/tree/master/examples/rest-react
import { server } from "./tests/unit/helpers/server";

import { TextEncoder, TextDecoder } from 'util'
global.TextEncoder = TextEncoder
global.TextDecoder = TextDecoder


// fix "This script should only be loaded in a browser extension." e.g. https://github.com/mozilla/webextension-polyfill/issues/218
if (!chrome.runtime.id) chrome.runtime.id = "history-delete";

Expand Down
60 changes: 32 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lightning-browser-extension",
"version": "1.22.1",
"version": "1.24.0",
"description": "Lightning browser extension",
"private": true,
"repository": "https://github.com/bumi/lightning-browser-extension.git",
Expand Down Expand Up @@ -37,32 +37,35 @@
"dependencies": {
"@bitcoin-design/bitcoin-icons-react": "^0.1.9",
"@headlessui/react": "^1.7.7",
"@noble/secp256k1": "^1.7.0",
"lnc-web": "git+https://github.com/bumi/lnc-web.git#remove-window-dependency",
"@noble/secp256k1": "^1.7.1",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/line-clamp": "^0.4.2",
"@vespaiach/axios-fetch-adapter": "^0.3.0",
"avvvatars-react": "^0.4.2",
"axios": "^0.27.2",
"bech32": "^2.0.0",
"bolt11": "^1.4.0",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.7",
"dexie": "^3.2.2",
"dexie": "^3.2.3",
"elliptic": "^6.5.4",
"html5-qrcode": "^2.3.1",
"i18next": "^22.4.6",
"html5-qrcode": "^2.3.4",
"i18next": "^22.4.9",
"i18next-browser-languagedetector": "^7.0.1",
"lnmessage": "^0.0.14",
"lnmessage": "^0.0.18",
"lodash.merge": "^4.6.2",
"lodash.pick": "^4.4.0",
"lodash.snakecase": "^4.1.1",
"pubsub-js": "^1.9.4",
"react": "^18.2.0",
"react-confetti": "^6.1.0",
"react-dom": "^18.2.0",
"react-i18next": "^12.1.1",
"react-i18next": "^12.1.4",
"react-loading-skeleton": "^3.1.0",
"react-modal": "^3.16.1",
"react-qr-code": "^2.0.8",
"react-router-dom": "^6.6.1",
"react-qr-code": "^2.0.11",
"react-router-dom": "^6.7.0",
"react-toastify": "^9.1.1",
"stream": "^0.0.2",
"tailwindcss": "^3.2.4",
Expand All @@ -71,28 +74,29 @@
"zustand": "^3.7.2"
},
"devDependencies": {
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@commitlint/cli": "^17.4.1",
"@commitlint/config-conventional": "^17.4.2",
"@jest/types": "^29.3.1",
"@playwright/test": "^1.29.1",
"@swc/core": "^1.3.24",
"@playwright/test": "^1.29.2",
"@swc/core": "^1.3.27",
"@swc/jest": "^0.2.24",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/chrome": "^0.0.206",
"@types/chrome": "^0.0.210",
"@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.0.10",
"@types/react-modal": "^3.13.1",
"@types/uuid": "^9.0.0",
"@types/webextension-polyfill": "^0.9.2",
"@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^5.45.1",
"@types/webextension-polyfill": "^0.10.0",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"autoprefixer": "^10.4.13",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
Expand All @@ -102,28 +106,28 @@
"css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^4.2.2",
"del-cli": "^5.0.0",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.31.11",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-react": "^7.32.1",
"eslint-plugin-react-hooks": "^4.6.0",
"fake-indexeddb": "^3.1.8",
"fake-indexeddb": "^4.0.1",
"filemanager-webpack-plugin": "^8.0.0",
"html-webpack-plugin": "^5.5.0",
"husky": "^8.0.2",
"husky": "^8.0.3",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-webextension-mock": "^3.8.7",
"jest-webextension-mock": "^3.8.8",
"lint-staged": "^13.1.0",
"mini-css-extract-plugin": "^2.7.2",
"msw": "^0.49.2",
"postcss": "^8.4.20",
"msw": "^1.0.0",
"postcss": "^8.4.21",
"postcss-cli": "^10.1.0",
"postcss-loader": "^7.0.2",
"pptr-testing-library": "^0.7.0",
"prettier": "^2.8.1",
"prettier": "^2.8.3",
"process": "^0.11.10",
"puppeteer": "^19.4.1",
"puppeteer": "^19.5.2",
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"stream-browserify": "^3.0.0",
Expand Down
24 changes: 13 additions & 11 deletions src/app/components/AccountMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
AddressBookIcon,
CaretDownIcon,
CheckIcon,
PlusIcon,
} from "@bitcoin-design/bitcoin-icons-react/filled";
import { CheckIcon } from "@bitcoin-design/bitcoin-icons-react/filled";
import { WalletIcon } from "@bitcoin-design/bitcoin-icons-react/outline";
import { useState, useEffect } from "react";
import Avvvatars from "avvvatars-react";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import Skeleton from "react-loading-skeleton";
import { useNavigate } from "react-router-dom";
Expand Down Expand Up @@ -73,10 +73,10 @@ function AccountMenu({ showOptions = true }: Props) {
}

return (
<div className="relative pl-2 flex bg-gray-100 rounded-md dark:bg-surface-12dp max-w-full">
<p className="flex items-center">
<WalletIcon className="-ml-1 w-8 h-8 opacity-50 dark:text-white" />
</p>
<div className="relative pl-2 w-72 flex bg-gray-100 rounded-md dark:bg-surface-12dp">
<div className="flex items-center">
<Avvvatars value={authAccount?.name || ""} style={"shape"} />
</div>

<div
className={`flex-auto mx-2 py-1 overflow-hidden ${
Expand Down Expand Up @@ -112,7 +112,7 @@ function AccountMenu({ showOptions = true }: Props) {
<span className="sr-only">{t("screen_reader")}</span>
</Menu.Button>

<Menu.List position="left">
<Menu.List position="left" fullWidth>
<Menu.Subheader>{t("title")}</Menu.Subheader>

{Object.keys(accounts).map((accountId) => {
Expand All @@ -126,14 +126,16 @@ function AccountMenu({ showOptions = true }: Props) {
disabled={loading}
title={account.name}
>
<WalletIcon className="w-6 h-6 -ml-0.5 mr-2 shrink-0 opacity-75 text-gray-700 dark:text-neutral-300" />
<span className="overflow-hidden text-ellipsis whitespace-nowrap">
<div className="shrink-0">
<Avvvatars value={account.name} style={"shape"} />
</div>
<span className="overflow-hidden text-ellipsis whitespace-nowrap ml-2">
{account.name}&nbsp;
</span>
{accountId === authAccount?.id && (
<span
data-testid="selected"
className="ml-auto w-3.5 h-3.5 rounded-full bg-orange-bitcoin flex justify-center items-center"
className="ml-auto flex-shrink-0 w-3.5 h-3.5 rounded-full bg-orange-bitcoin flex justify-center items-center"
>
<CheckIcon className="w-3 h-3 text-white" />
</span>
Expand Down
Loading

0 comments on commit 1acacba

Please sign in to comment.