Code Monkey home page Code Monkey logo

pelagus-extension's Introduction

Pelagus Extension

Pelagus is a community owned and operated Web3 wallet, built as a browser extension.

Quickstart

Try this.

$ nvm use
$ nvm install
$ npm install -g yarn # if you don't have yarn globally installed
$ yarn install # install all dependencies; rerun with --ignore-scripts if
               # scrypt node-gyp failures prevent the install from completing
$ yarn start # start a continuous webpack build that will auto-update with changes

Once the build is running, you can install the extension in your browser of choice:

Extension bundles for each browser are in dist/<browser>.

By default, the yarn start command rebuilds the extension for each browser on save. You can target a particular browser by specifying it in the command, e.g. to only rebuild the Firefox extension on change:

# On change, rebuild the firefox extension but not others.
$ yarn start --config-name firefox
# On change, rebuild the firefox and brave extensions but not others.
$ yarn start --config-name firefox --config-name brave

Note for some Linux distributions

In some Linux distributions such as Ubuntu 20.04, you need to explicitly tell npm where your python3 executable is located before running the above commands successfully:

$ npm config set python /usr/bin/python3

Package Structure, Build Structure, and Threat Model

The extension is built as two packages, background and ui. background contains the bulk of the extension's background script, while ui contains the code powering extension popups.

These are separate packages in order to emphasize the difference in attack surface and clearly separate the threat models of each. In particular, ui is considered untrusted code, while background is considered trusted code. Only background should interact with key material regularly, while ui should only interact with key material via a carefully maintained API.

The background package is also intended to minimize external dependencies where possible, reducing the surface exposed to a supply chain attack. Dependencies are generally version-pinned, and yarn is used to ensure the integrity of builds.

Building and Developing

Builds are designed to be run from the top level of the repository.

Development Setup

If you’re on macOS, install Homebrew and run scripts/macos-setup.sh. Note that if you don’t have Homebrew or you’re not on macOS, the below information details what you’ll need. The script additionally sets up pre-commit hooks.

$ ./scripts/macos-setup.sh

Validators

If you need to create or update a validation function then:

  • You need to write the schema in the .ts file to have correct typing.
  • Add the new schema with the validator function name to the generate-validators.ts file
  • You need to update the jtd-validators.d.ts or json-validators.d.ts files with the typing definition
  • run yarn run generate:validators
  • import it in your code and happy validating :)

This setup is necessary so we don't need to include unsafe-eval in the CSP policy.

Required Software

If you can't use the macOS setup script, here is the software you'll need to install:

Installing pre-commit hooks

Before committing code to this repository or a fork/branch that you intend to submit for inclusion, please make sure you've installed the pre-commit hooks by running pre-commit install. The macOS setup script does this for you.

Local mainnet fork setup for development

For more detailed description see ./dev-utils/local-chain/README.md

Quick Start:

$ cd dev-utils/local-chain
$ yarn install
$ yarn start

Commit signing

Commits on the Pelagus repository are all required to be signed. No PR will be merged if it has unsigned commits. See the GitHub documentation on commit signing to get it set up.

Releasing a version

This repository uses yarn version to create new versions. Typical usage:

$ yarn version --patch # bump patch version, e.g. 0.0.5->0.0.6
$ yarn version --minor # bump minor version, e.g. 0.1.5->0.2.0

Major releases generally require more discussion than this automation allows, but can be managed the same way.

Bumping a version in this way will do a few things:

  • Ensure the commit is running on the correct branch (release-<new-version>) for review. If you are on a different branch, the script attempts to switch to a new branch based on the latest origin/main. Releases should generally only add version bumps to the main branch.
  • Synchronize the extension manifest version to the updated package version.
  • Commit, tag, and push the new version and branch.

Once the branch is pushed, you should open a pull request. This will do any further processing, including potentially managing automated submission of the new version to extension directories (as relevant).

Additional Scripts

$ yarn build # create a production build of the extension

The build script will generate a ZIP file for each browser bundle under the dist/ directory.

$ yarn lint # lint all sources in all projects
$ yarn lint-fix # auto-fix any auto-fixable lint issues
$ yarn test # run all tests in all projects

A note on git blame

Because lint configurations can occasionally evolve in a way that hits many files in the repository at once and obscures the functional blame readout for files, this repository has a .git-blame-ignore-revs file. This file can be used to run git blame while skipping over the revisions it lists, as described in the Pro Git book reference and this Moxio blog post.

To make use of this, you can do one of the following:

  • Run git config --global blame.ignoreRevsFile .git-blame-ignore-revs to configure git to globally look for such a file. The filename is relatively standard across projects, so this should save time for other projects that use a similar setup.
  • Run git config blame.ignoreRevsFile .git-blame-ignore-revs to configure your local checkout to always ignore these files.
  • Add --ignore-revs-file .git-blame-ignore-revs to your git blame invocation to ignore the file one time.

The GitHub UI does not yet ignore these commits, though there is a community thread requesting the feature. In the meantime, the GitHub blame UI does allow you to zoom to the previous round of changes on a given line, which relieves much of the annoyance; see the GitHub blame docs for more.

Architecture

Here is a light architecture diagram describing the relationship between services (in the API package) and the interface and browser notifications:

┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                     │
│   ____                  _                                                                           │
│  / ___|  ___ _ ____   _(_) ___ ___  ___                                                             │
│  \___ \ / _ \ '__\ \ / / |/ __/ _ \/ __|                                       ┌────────────────────┼──┐
│   ___) |  __/ |   \ V /| | (_|  __/\__ \                                       │                    │  │
│  |____/ \___|_|    \_/ |_|\___\___||___/                                       │                    │  │   ┌─────────────────┐
│                                                                     Chain                           │  │   │External Services│
│                                                                     - Blocks      ━━━━━━━━━━━━┓     │  │   │                 │
│                 ┌────subscribe (incoming or outgoing tx status)───▶ - Transactions            ┃     │  │   │  Local node     │
│                 │                                                                             ┃     │  │   │                 │
│                 │                                                                             ┃     │  │   │  Alchemy        │
│                 │                                                                             ┃     │  ├───▶                 │
│                 │                                                    Indexing                 ┃     │  │   │  BlockNative    │
│                 │                                                    - Accounts               ┃     │  │   │                 │
│                 │                                                    - ERC-20 balances    ━━━━╋─────┼──┘   │  CoinGecko      │
│                 ├───subscribe (eg balance changes), get balances───▶ - ERC-721 ownership      ┃     │      │                 │
│                 │                                                    - Governance proposals   ┃     │      │                 │
│                 │                                                    - On-chain prices        ┃     │      └─────────────────┘
│                 │                                                                             ┃     │
│                 │                                                                             ┃     │      ┌────────────────┐
│                 │                                                   Keyring                   ┃     │      │                │
│                 ├──────list accounts, sign tx, sign message───────▶ - Native  ────────────────╋─────┼──────▶   Extension    │
│                 │                                                   - Remote                  ┃     │      │  Storage API   │
│      ┌──────────┴──────────┐                                                                  ┃     │      │                │
│      │                     │                                                                  ┃     │      └────────────────┘
│      │                     │                                                                  ┃     │
│      │     Wallet API      │──────┐                                 Preferences  ━━━━━━━━━━━━━┫     │
│      │                     │      │                                                           ┃     │      ┌────────────────┐
│      │                     │      │                                                           ┃     │      │                │
│      └──────────▲──────────┘      │                                 Notifications             ┃     │      │                │
│                 │                 │                                 - Ephemeral               ┣━━━━━╋━━━━━━▶   IndexedDB    │
│                 │                 └──────pull and subscribe───────▶ - Application      ━━━━━━━┛     │      │                │
│                 │                                                   - Security-critical             │      │                │
│             subscribe                                                          │                    │      └────────────────┘
│              and get                                                           │                    │
│                 │                                                              │                    │
│                 │                                                            push                   │
│                 │                                                              │                    │
└─────────────────▼──────────────────────────────────────────────────────────────┼────────────────────┘
┌──────────────────────────────────┐                             ┌───────────────▼───────────────┐
│                                  │                             │                               │
│                                  │                             │                               │
│         Wallet interface         │                             │     Browser notifications     │
│                                  │                             │                               │
│                                  │                             │                               │
└──────────────────────────────────┘                             └───────────────────────────────┘
                   ┌───────────────┐
                   │               │
                   │ Internal dApp │
                   │               │
                   └───────────────┘
                   ┌──────┐ ┌──────┐
                   │ Earn │ │ Swap │
                   └──────┘ └──────┘

File Structure

Extension content lives directly under the root directory alongside project-level configuration and utilities, including GitHub-specific functionality in .github. Extension content should be minimal, and largely simply glue together UI and wallet code. Manifest information is managed in the manifest/ subdirectory as described below.

Here is a light guide to the directory structure:

.github/ # GitHub-specific tooling

package.json      # private extension package
webpack.config.js # Webpack build for extension

src/ # extension source files
  background.js # entry file for the background extension script; should be
                # minimal and call in to @pelagus/pelagus-wallet
  ui.js         # entry file for the frontend UI; should be minimal and bind
                # the functionality in @pelagus/pelagus-ui

dist/ # output directory for builds
  brave/   # browser-specific
  chrome/  # build
  edge/    # directories
  firefox/
  brave.zip  # browser-specific
  chrome.zip # production
  edge.zip   # bundles
  firefox.zip

build-utils/ # build-related helpers, used in webpack.config.js
  *.js
dev-utils/          # dev-mode helpers for the extension
  extension-reload.js # LiveReload support for the extension.
manifest/         # extension manifest data
  manifest.json             # common manifest data for all browsers
  manifest.chrome.json      # manifest adjustments for Chrome
  manifest.dev.json         # manifest adjustments for dev environment
  manifest.firefox.dev.json # manifest adjustments for Firefox in dev

background/ # @pelagus/pelagus-background package with trusted wallet core
  package.json

ui/ # @pelagus/pelagus-ui package
  package.json

Firefox store build

Firefox requires to upload source code if minifier is used and to be able to compile identical output to the uploaded package. Our builds are environment dependent at the moment because of the minification and source map process. Long term solution will be to upgrade our build process to be able to produce identical file assets, but until then we use Docker.

  • install and setup docker: https://docs.docker.com/get-docker/
  • git clone [email protected]:tallycash/extension.git tallyho-firefox
  • cd tallyho-firefox
  • git checkout tags/latest_release-tag
  • .env.prod: fill in the prod API keys
  • ./firefox-build.sh
  • mv firefox.zip ../
  • git clean -fdx
  • rm -rf .git
  • cd ..
  • zip -r tallyho-firefox.zip tallyho-firefox

Localization

Pelagus currently only supports English as the default language. We distill english strings to _locales to prepare for localization.

For other languages, we will use language code defined in Support locales. We will use weblate for crowd translation, and will commit back to the github periodically after these translations are QA'ed.

Translation status

CICD

The GitHub Actions workflow is defined in .github/workflows/ and is responsible for building, testing, and pushing a release for the extension to GitHub. It triggers when a new commit is pushed to the main branch with a tag that matches the pattern v*.

In order to create a new release, you need to create a new tag and push it to the repository. The tag should be in the format v*, where * is the version number. For example, to create a new release with version v1.0.0, you would run the following commands:

$ git tag v1.0.0
$ git push origin v1.0.0

You can also manually run the build workflow by going to the Actions tab in the GitHub repository and selecting the Build-Manual workflow.

pelagus-extension's People

Contributors

artemburakov avatar michaelkostroma avatar jdowning100 avatar robertlincecum avatar rileystephens28 avatar denisivanov26 avatar robschleusner avatar alanorwick avatar juuddi avatar 0xmgb avatar flukyblock avatar wizeguyy avatar

Stargazers

 avatar  avatar  avatar akari avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar griegog211 avatar 0xnth avatar sang_dong avatar Joseph Uwoziya  avatar Raphael Schmid avatar  avatar Javed Khan avatar  avatar TANZINA AKTER avatar Clark avatar mheez avatar  avatar  avatar n0v3l14 avatar ahmed mossati avatar Niceguysathya avatar  avatar

Watchers

Lucian avatar

pelagus-extension's Issues

Unable to send any transactions when running on local network without turning wallet off then on

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Steps to reproduce:

  1. Have a wallet that is running on colosseum
  2. Start a local node and CPU miner, mining rewards going to wallet addresses
  3. Change wallet to local and try to send a TX

Screenshot 2023-09-11 at 11 31 36 AM

What did not work?

TX never went through. Was able to fix by turning wallet off then back on in Manage Extensions page of Chrome.

Version

v0.38.1

Relevant log output

No response

Wallet isn't opened by Alt+T combination

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

On attempt to open extension by Alt+T combination combination is recognized, keys on onboarding UI are highlighted when pressed.

What did not work?

Extension doesn't open.

Version

v0.38.1

Relevant log output

No response

"Set Pleagus as Default Wallet" toggle doesn't work

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

I was trying to use the toggle to set Pelagus as default wallet when setting up a new wallet

What did not work?

The toggle button didn't work (you couldn't click it)

Version

None

Relevant log output

No response

Remove add networks

Discord Discussion Link

N/A

What would you like to be able to do?

Remove add networks button

Extension sometimes shows a blank page when opened

Discord Discussion Link

N/A

What would you like to be able to do?

I have noticed that the extension page sometimes shows a blank page when opened. Need to view logs and debug further to discern exactly why. To fix, either close and reopen the extension or turn the extension off and on (in Chrome Manage Extension).

[UI Updates] Onboarding Screen Text Entry Padding

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Screenshot 2023-09-07 120445

What did not work?

the padding on the default text entry needs to be updated to match the padding used when a user has a text entry.

Version

None

Relevant log output

No response

Remove price ticker

Discord Discussion Link

N/A

What would you like to be able to do?

Remove price ticker (USD)

ETXs are shown as 'dropped' on activity page

Discord Discussion Link

N/A

What would you like to be able to do?

For some reason, InternalToExternal transactions (transactions that emit an ETX) are shown as 'dropped' when they are confirmed.

Add Transaction Hash to transaction

Discord Discussion Link

na

What would you like to be able to do?

See tx hash in activity details. Add { label: "Hash", value: tx.hash } to activities-utils.ts line 274 to add it. Then fix formatting.

[UI Updates] Updated Onboarding Layout

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Screenshot 2023-09-07 120135

What did not work?

We would like to update the composition of the onboarding screen. I will provide you the web ready image we would like to use for this but 66% image - 33% onboarding interface similar to the mockup uploaded.

Version

None

Relevant log output

No response

[UI Updates] Onboarding Page Headline Colors

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Screenshot 2023-09-07 123306

What did not work?

We need this text updated to white. This issue is also in the Ledger flow. Check the whole flow to make sure we've gotten all of these issues.

Version

None

Relevant log output

No response

Total account balance: value is displayed incorrectly when lower then 0.1

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Steps to reproduce:

  1. Send less then 0.1 QUAI tokens to address that has 0 QUAI;
  2. Select this address in the list;
  3. Check balance on main screen;

Expected result: displayed token amount should be equal to to amount from step 1.

What did not work?

Actual result: Balance isn't displayed in proper format, decimals that should be after point displayed before it.
Screenshot-from-2023-08-17-13-28-33

Version

v0.38.1

Relevant log output

No response

[UI Updates] Add custom asset text color

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

image

What did not work?

"Contract Address" text is too light

Version

None

Relevant log output

No response

[UI Updates] Dapp Connections Background Overlay Color

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Screenshot 2023-09-07 113706

What did not work?

The green overlay when interacting with the Dapp Connections needs to be updated to a dark blue or just grey.

Version

None

Relevant log output

No response

Fix linter/exclude unused files

Discord Discussion Link

N/A

What would you like to be able to do?

[warn] .github/ISSUE_TEMPLATE/config.yml
[warn] .github/workflows/test-list/release-test-list.md

If Pelagus wallet extension is enabled, Metamask extension is not recognized

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Precondition

  • Having Metamask extension installed with a wallet configured
  • Set Pelagus wallet as default wallet

Steps

  1. Try to connect in any page which requires metamask wallet having the pelagus extension disabled. Example: https://alpha.rare.xyz/
  2. You are going to be able to connect your wallet correctly
  3. Enable the pelagus extension
  4. Do a refresh in the first page
  5. Try to connect your wallet
  6. You are going to see that Metamask is not recognized

What did not work?

Metamask extension is not recognized in the browser while the Pelagus wallet extension is enabled

Version

v0.38.1

Relevant log output

No response

Pelagus is not correctly estimating gas for cross-prime

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome, Brave

What were you trying to do?

Send an ETX from cyprus-2 to another chain (non-cyprus) and the transaction was getting completely dropped. It had enough gas to leave the wallet, but the money never landed in the destination account.

The blocks were mining correctly (enough coincident blocks so that the tx should've gone through), but still no funds. Shreekara was able to send cross-prime TX by using a script, and the gas was much higher than pelagus's estimation

Pelagus estimated gas 0x186a0, max fee: 0x218711a09 (9,000,000,009)
Shreekara estimated gas 0xa410, max fee per gas: 0x649534e00 (27,000,000,000)

What did not work?

The TX never came through. I WAS able to send transactions between chains within the same region. But the gas estimation was not enough to send all the way across prime

Version

None

Relevant log output

Pelagus getTransactionReceipt result:
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x0000393e0478d9ede415e531ecec34a1be6af9392169900c6c0e95790330435a",
        "blockNumber": "0x42b2",
        "contractAddress": null,
        "cumulativeGasUsed": "0xa410",
        "effectiveGasPrice": "0x3b9aca01",
        "etxs": [
            {
                "type": "0x1",
                "nonce": "0x3",
                "gasPrice": null,
                "maxPriorityFeePerGas": "0x218711a00",
                "maxFeePerGas": "0x218711a09",
                "gas": "0x186a0",
                "value": "0x6aaf7c8516d0c0000",
                "input": "0x",
                "to": "0x7684b88843b2556e8fa5e55bf7eb5ce6571f4733",
                "accessList": [],
                "chainId": "0x539",
                "sender": "0x3ae23f1222894604fd5498bc83e7dc2dea853633",
                "hash": "0x98a68f038ab200a864058ccd0dbf3d09c380b03f559cc0b14a9c005ffbabd3ef"
            }
        ],
        "from": "0x3ae23f1222894604fd5498bc83e7dc2dea853633",
        "gasUsed": "0xa410",
        "logs": [],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1",
        "to": "0x7684b88843b2556e8fa5e55bf7eb5ce6571f4733",
        "transactionHash": "0x3c2aefc53ec4b63e643966ac782f4912253c9217c0a020968e4135e3c78d21d3",
        "transactionIndex": "0x0",
        "type": "0x2"
    }
}


Shreekara getTransactionReceiptLogs:
"result": {
        "blockHash": "0x000013a566adde0373a22128a5c2503a55801a7d43de6504d028d776e99fa09f",
        "blockNumber": "0x9",
        "contractAddress": null,
        "cumulativeGasUsed": "0xa410",
        "effectiveGasPrice": "0x77359400",
        "etxs": [
            {
                "type": "0x1",
                "nonce": "0x2",
                "gasPrice": null,
                "maxPriorityFeePerGas": "0x218711a00",
                "maxFeePerGas": "0x649534e00",
                "gas": "0xa410",
                "value": "0x23",
                "input": "0x",
                "to": "0x63e696b526f6fa5bbedee8c15edb55cb29a164af",
                "accessList": [],
                "chainId": "0x539",
                "sender": "0x0042c33e1d7cd57d5de8c422be76868aaccae287",
                "hash": "0xb9fdd0f7e2c1a9cbdaa8f305f95dae35e3598e7416625d5efa188dd9c364b752"
            }
        ],
        "from": "0x0042c33e1d7cd57d5de8c422be76868aaccae287",
        "gasUsed": "0xa410",
        "logs": [],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1",
        "to": "0x63e696b526f6fa5bbedee8c15edb55cb29a164af",
        "transactionHash": "0xe5863c2ef7420a7cfe02f4aa4ef619bde4d793ff66b9dfca3827cd23db30f101",
        "transactionIndex": "0x0",
        "type": "0x2"
    }

UI bugs in windowed mode

Discord Discussion Link

N/A

What would you like to be able to do?

Screen Shot 2023-09-16 at 4 55 29 PM Screen Shot 2023-09-16 at 4 56 27 PM

Boxes not aligned, text difficult to see, and Pelagus animation out of bounds

Sending transaction: amount equal to wallet balance shouldn't be accepted

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Steps to reproduce:

  1. Initialize sending transaction;
  2. In "Amount" field indicate same value as user balance;
  3. Enter recipient address;
  4. Click "Continue" button;

Actual result: user is directed to the same screen, as if transaction sending was successful.

What did not work?

Expected result: I can suggest 2 option to handle this case

  • Continue button shouldn't be unlocked and value used for limiting amount should be adjusted to include fee for the transaction.
  • Given error should be processed and keep user on send screen and give notification that user doesn't have enough funds to pay for fee.

Version

v0.38.1

Relevant log output

Skipping fallback for unidentified error Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":411,\"error\":{\"code\":-32000,\"message\":\"insufficient funds for gas * price + value\"}}\n", error={"code":-32000}, requestBody="{\"method\":\"quai_sendRawTransaction\",\"params\":[\"0x00f87682232880843b9aca00843b9aca07830186a094114e43d552cc9c404bbdadd2ac08446f66a9db1d89d8d726b7177a80000080c001a0c205c72fb4bd4439a6470371e6c0b0e6df05d40699d0da1c61768fcec1322365a003307256f3eac0014a67477a6aaea826eefc70a48b2a803db265d6f6985521bc\"],\"id\":411,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://rpc.cyprus1.colosseum.quaiscan.io", code=SERVER_ERROR, version=web/0.1.0)
    at Logger.makeError (index.js:224:1)
    at Logger.throwError (index.js:233:1)
    at index.js:261:1
    at Generator.next (<anonymous>)
    at fulfilled (index.js:5:43) Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":411,\"error\":{\"code\":-32000,\"message\":\"insufficient funds for gas * price + value\"}}\n", error={"code":-32000}, requestBody="{\"method\":\"quai_sendRawTransaction\",\"params\":[\"0x00f87682232880843b9aca00843b9aca07830186a094114e43d552cc9c404bbdadd2ac08446f66a9db1d89d8d726b7177a80000080c001a0c205c72fb4bd4439a6470371e6c0b0e6df05d40699d0da1c61768fcec1322365a003307256f3eac0014a67477a6aaea826eefc70a48b2a803db265d6f6985521bc\"],\"id\":411,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://rpc.cyprus1.colosseum.quaiscan.io", code=SERVER_ERROR, version=web/0.1.0)
    at Logger.makeError (chrome-extension://gdnpnedmjcfhgokohcgocjclepjijcaf/background.js:45169:23)
    at Logger.throwError (chrome-extension://gdnpnedmjcfhgokohcgocjclepjijcaf/background.js:45178:20)
    at chrome-extension://gdnpnedmjcfhgokohcgocjclepjijcaf/background.js:57763:32
    at Generator.next (<anonymous>)
    at fulfilled (chrome-extension://gdnpnedmjcfhgokohcgocjclepjijcaf/background.js:57507:58)
routeRpcCall @ serial-fallback-provider.ts:401
await in routeRpcCall (async)
send @ serial-fallback-provider.ts:546
(anonymous) @ json-rpc-provider.js:602
(anonymous) @ json-rpc-provider.js:8
(anonymous) @ json-rpc-provider.js:4
perform @ json-rpc-provider.js:579
(anonymous) @ base-provider.js:1394
fulfilled @ base-provider.js:5
Promise.then (async)
step @ base-provider.js:7
fulfilled @ base-provider.js:5
Promise.then (async)
step @ base-provider.js:7
fulfilled @ base-provider.js:5
Promise.then (async)
step @ base-provider.js:7
(anonymous) @ base-provider.js:8
(anonymous) @ base-provider.js:4
sendTransaction @ base-provider.js:1385
(anonymous) @ assets.ts:525
(anonymous) @ index.js:306
emit @ index.js:304
await in emit (async)
(anonymous) @ main.ts:968
setTimeout (async)
(anonymous) @ main.ts:968
await in (anonymous) (async)
(anonymous) @ index.js:306
emit @ index.js:304
await in emit (async)
signData @ assets.ts:541
(anonymous) @ assets.ts:308
(anonymous) @ utils.ts:129
(anonymous) @ redux-toolkit.esm.js:1112
step @ redux-toolkit.esm.js:38
(anonymous) @ redux-toolkit.esm.js:19
(anonymous) @ redux-toolkit.esm.js:87
__async @ redux-toolkit.esm.js:69
(anonymous) @ redux-toolkit.esm.js:1096
(anonymous) @ redux-toolkit.esm.js:1150
(anonymous) @ index.js:8
(anonymous) @ redux-toolkit.esm.js:314
(anonymous) @ alias.js:20
dispatchResponse @ wrapStore.js:94
(anonymous) @ serialization.js:38
index.js:224 Uncaught (in promise) Error: insufficient funds for intrinsic transaction cost [ See: https://links.quais.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":411,\"error\":{\"code\":-32000,\"message\":\"insufficient funds for gas * price + value\"}}\n","error":{"code":-32000},"requestBody":"{\"method\":\"quai_sendRawTransaction\",\"params\":[\"0x00f87682232880843b9aca00843b9aca07830186a094114e43d552cc9c404bbdadd2ac08446f66a9db1d89d8d726b7177a80000080c001a0c205c72fb4bd4439a6470371e6c0b0e6df05d40699d0da1c61768fcec1322365a003307256f3eac0014a67477a6aaea826eefc70a48b2a803db265d6f6985521bc\"],\"id\":411,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://rpc.cyprus1.colosseum.quaiscan.io"}, method="sendTransaction", transaction="0x00f87682232880843b9aca00843b9aca07830186a094114e43d552cc9c404bbdadd2ac08446f66a9db1d89d8d726b7177a80000080c001a0c205c72fb4bd4439a6470371e6c0b0e6df05d40699d0da1c61768fcec1322365a003307256f3eac0014a67477a6aaea826eefc70a48b2a803db265d6f6985521bc", code=INSUFFICIENT_FUNDS, version=providers/0.1.0)
    at Logger.makeError (index.js:224:1)
    at Logger.throwError (index.js:233:1)
    at checkError (json-rpc-provider.js:95:1)
    at SerialFallbackProvider.<anonymous> (json-rpc-provider.js:605:1)
    at Generator.throw (<anonymous>)
    at rejected (json-rpc-provider.js:6:42)

[UI Updates] Send Page Advanced Options

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome, Brave

What were you trying to do?

Screenshot 2023-09-07 113554

What did not work?

  • The horizontal padding is incorrect on the advanced options text fields
  • The padding on the labels above the text fields are too high
  • The up and down arrows vertical padding is incorrect in the text fields
  • The text entry in the advanced option is white once adjusted.
  • The advanced button doesn't look like a button. We need to update this to be more clear it is a button, for the time being we can either add an underline to the text or a gear icon.

Version

None

Relevant log output

No response

Settings: unable to turn on analytics

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

When user finishes onboarding process notification about analytics being turned on by default appears. Click on this notification leads user to settings with ability to change analytics settings switch.

What did not work?

Switch doesn't reacts to user clicks.

Version

v0.38.1

Relevant log output

No response

I can not send funds (Q) after a dropped tx

Discord Discussion Link

https://discord.com/channels/1105993972247175229/1117868165771317459/1144261066294038558

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Preconditions

  • Have funds in the wallet

Steps
-I tried to send funds (Q) in cyprus-1 net to an address

  • The transaction kept on 'pending to confirm'.
  • Today (24 Aug, 2023) the status of the transaction is:
    --------- In the wallet: status equal to 'dropped'
    --------- In the quaiscan: unconfirmed - pending
block.-sent.quai.mp4

Expected result
I should be able to send funds to another address and the status of the transaction should be consistent between wallet and quaiscan

What did not work?

Obtained result

  • The original transaction has two different status between wallet (dropped) and quaiscan (unconfirmed/ pending)
  • When I try to do another transaction to send funds (Q), I can not continue

Version

v0.38.1

Relevant log output

tx: https://cyprus1.colosseum.quaiscan.io/tx/0x28ad6bc1bd06438e9cc7049ae121d43356052df67fce3294ac1e0d2783faa3f0

My address: 0x08bcc8d7577cc551e2e49c6252318384301ca6b3

Fix db.getCurrentNetworkForOrigin

Discord Discussion Link

N/A

What would you like to be able to do?

Fix db.getCurrentNetworkForOrigin so getCurrentInternalNetwork and getCurrentOrDefaultNetworkForOrigin works in internal-ethereum-provider

Add ability to clear previous transaction history

Discord Discussion Link

N/A

What would you like to be able to do?

When testing in local, I noticed that after sending some transactions and then resetting the chain, the wallet was unable to find information about previous transactions leading to some strange behavior when sending transactions and viewing transaction history. To fix this, we should allow the user to delete previous transaction history. This is a low-priority feature.

Activity: completed transaction have "Pending" status

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Steps to reproduce:

  1. Send QUAI from one address to another with 1 shard;
  2. Wait until funds will arrive to recipient address;
  3. Check transaction status in recent activity.

Expected result: status should be completed.

What did not work?

Actual result: transaction still has pending status.

Version

v0.38.1

Relevant log output

No response

[UI Updates] Send and Receive Icon Color Updates

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Screenshot 2023-09-07 112859
Screenshot 2023-09-07 112837

What did not work?

The icons to the left of 'Send' and 'Receive' should be our main blue. Let me know if these are pngs and I can provided you with an updated icon.

Version

None

Relevant log output

No response

Small UI Tweaks

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome, Brave

What were you trying to do?

Will put small UI tweaks on this issue report

What did not work?

Screenshot 2023-09-06 at 12 11 10 PM

Photos above

Version

None

Relevant log output

No response

Unlocking wallet: validation errors are displayed when correct password is entered

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Steps to reproduce:

  1. Add more than 1 wallet to extension;
  2. Lock signing;
  3. Attempt to unlock signing using incorrect password;
  4. Unlock signing with correct password.

What did not work?

Signing unlocked! message appears. But validation error about incorrect password is displayed.

Version

v0.38.1

Relevant log output

No response

ShardFromRpcUrl should throw an error when it encounters an unknown rpc

Discord Discussion Link

No response

What would you like to be able to do?

From #3
Currently RPCs from other chains are sent into this function, so throwing an error will break logic that would otherwise perform 'acceptably'. Instead it just logs an error. When we remove RPCs from other chains it should throw an error (break the logic).

Display network connection error to user

Discord Discussion Link

N/A

What would you like to be able to do?

Currently, if the RPC nodes are down or the user does not have an internet connection, the wallet will log an error in the console, try again in a few second (with a backoff) and the wallet will fail silently. Instead, some kind of error or toast message should be displayed to the user so that they are aware.

[UI Updates] Custom Asset Icon

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Screenshot 2023-09-07 113453
Screenshot 2023-09-07 113013

What did not work?

The custom asset icon needs an updated color and the same update behind this import icon under accounts

Version

None

Relevant log output

No response

Unable to check "Set Pelagus as your Default Wallet" Slider

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

When going through the setup flow on Chrome, I tried to click the slider to make Pelagus my default wallet and the slider did not respond.

What did not work?

The slider did not move or respond to clicks.

Version

v0.38.1

Relevant log output

No response

[UI Updates] Custom gas and nonce screen

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Brave

What were you trying to do?

Apply custom gas and nonce to transaction

What did not work?

When I changed the gas and nonce, the existing number disappeared. The text color when typing in my own gas and nonce was white and barely visable.

Screenshot 2023-09-14 at 3 50 38 PM

Version

None

Relevant log output

No response

Processing - Approved - Settled for ETXs

Discord Discussion Link

N/A

What would you like to be able to do?

ETXs (internal to external) should have the following statuses:
Processing: Tx sent to mempool
Approved: Tx included in origin block
Settled: ETX included in destination

Send Page UI Requirements

Discord Discussion Link

N/A

What would you like to be able to do?

In the Send Page UI, we need to make the 'advanced' button prettier with highlight on hover and a carrot to indicate that it's a button. In addition, the 'to address' should wrap so that the user can see the entire address, and the advanced text boxes should look prettier in general.

Aggregated ticket for UI issues introduced in 0.2.0-rc.0

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

After recent UI changes layout of some elements is broken and others are hardly visible.

What did not work?

  • 1. Placeholder text on "Import phrase" screen is overlapped by field border.
  • 2. "Import account" label on locked button is barely readable
  • 3. Hotkeys for opening wallet aren't visible.
  • 4. "dApp would get permission to" label on connection screen is almost unnoticeable.

Version

v0.38.1

Relevant log output

No response

Please include an informative title that describes the bug!

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

During renaming entered long name for the wallet, that can't fit in one line.

What did not work?

Menu with controls of the wallet on the right side is moved out of boundaries and inaccessible for interaction.
Screenshot from 2023-09-07 18-20-45

Version

v0.38.1

Relevant log output

No response

Prevent transaction double broadcast

Discord Discussion Link

N/A

What would you like to be able to do?

In some cases a transaction is broadcast twice (I believe this happens in the smart contract/dapp interaction case). Need to investigate further and fix.

Add "Quai Colosseum Local" network to wallet

Discord Discussion Link

https://discord.com/channels/1105993972247175229/1117868165771317459/1151905420592562186

What would you like to be able to do?

The Colosseum network ("Quai Network") in the wallet currently uses the public Colosseum RPC nodes and the "Quai Network Local" network expects the "local" chain id (1337). We should add the ability for a user to connect to Colosseum through a local node via a new network - Quai Colosseum Local. In the future, users should also be able to specify their own RPC urls and their own chain ids.

Adding new address: extension crashes if region was typed incorrectly

Discord Discussion Link

No response

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

Adding new address to the existing wallet, when user is prompted to type shard.
Steps to reproduce:

  1. Click add new address;
  2. Type shard that doesn't relates to any existing one(e.g. cprs-4);
  3. Click New address button;
  4. Click somwere outside of extension to hide it;
  5. Click to open it again;

What did not work?

UI is absent, only background color is diaplyed.

Version

v0.38.1

Relevant log output

Uncaught (in promise) Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":45,\"error\":{\"code\":-32000,\"message\":\"address is not in scope\"}}\n", error={"code":-32000}, requestBody="{\"method\":\"quai_getCode\",\"params\":[\"0x2892e91f28e5cf3e91873724b7e237f871f24019\",\"latest\"],\"id\":45,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://rpc.hydra2.colosseum.quaiscan.io", code=SERVER_ERROR, version=web/0.1.0)
    at Logger.makeError (index.js:224:1)
    at Logger.throwError (index.js:233:1)
    at index.js:261:1
    at Generator.next (<anonymous>)
    at fulfilled (index.js:5:43)
makeError @ index.js:224
throwError @ index.js:233
(anonymous) @ index.js:261
fulfilled @ index.js:5
await in fulfilled (async)
enrichActivities @ main.ts:809
await in enrichActivities (async)
(anonymous) @ main.ts:1638
(anonymous) @ index.js:306
emit @ index.js:304
await in emit (async)
(anonymous) @ ui.ts:249
await in (anonymous) (async)
(anonymous) @ utils.ts:129
(anonymous) @ redux-toolkit.esm.js:1112
step @ redux-toolkit.esm.js:38
(anonymous) @ redux-toolkit.esm.js:19
(anonymous) @ redux-toolkit.esm.js:87
__async @ redux-toolkit.esm.js:69
(anonymous) @ redux-toolkit.esm.js:1096
(anonymous) @ redux-toolkit.esm.js:1150
(anonymous) @ index.js:8
(anonymous) @ redux-toolkit.esm.js:314
(anonymous) @ alias.js:20
dispatchResponse @ wrapStore.js:94
(anonymous) @ serialization.js:38

Display network connection error to user

Discord Discussion Link

N/A

What would you like to be able to do?

Currently, if the RPC nodes are down or the user does not have an internet connection, the wallet will log an error in the console, try again in a few second (with a backoff) and the wallet will fail silently. Instead, some kind of error or toast message should be displayed to the user so that they are aware.

Fix React-Devtools to work with manifest v3

Discord Discussion Link

NA

What would you like to be able to do?

React-Devtools appears broken in manifest v3. Refused to load the script 'http://localhost:8097/' because it violates the following Content Security Policy directive: "script-src-elem 'self'".
Code to enable it is commented out in webpack.config.ts and should be uncommented when it is working again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.