Giter Club home page Giter Club logo

mutiny-web's Introduction

Running Mutiny Web

Dependencies

  • pnpm > 8
pnpm install
pnpm run dev

Env

The easiest way to get start with development is to create a file called .env.local and copy the contents of .env.example into it. This is basically identical to the env that signet-app.mutinywallet.com uses.

Testing

We have a couple Playwright e2e tests in the e2e folder. You can run these with:

just test

Or get a visual look into what's happening:

just test-ui

Formatting

Hopefully your editor picks up on the prettier.config.mjs file and auto formats accordingly. If you want to format everything in the project run pnpm run format.

Deploying Web

Create a PR from master to prod, and once it does CI and gets approvals, do this from the command line:

git checkout master && git pull && git checkout prod && git pull && git merge --ff-only origin/master && git push

Contributing

Before committing make sure to run pnpm run pre-commit. This will typecheck, lint, and format everything so CI won't hassle you. (Shortcut: just pre).

Local

If you want to develop against a local version of the node manager, you may want to pnpm link it.

Due to how Vite's dev server works, the linked mutiny-node project folder should be a sibling of this mutiny-web folder. Alternatively you can change the allow path in vite.config.ts.

In your mutiny-node local repo:

just link

(on a Mac you might need to prefix just link with these flags: AR=/opt/homebrew/opt/llvm/bin/llvm-ar CC=/opt/homebrew/opt/llvm/bin/clang)

Now in this repo, link them.

just local

To revert back and use the remote version of mutiny-wasm:

just remote

Android

How to test locally

just native

Now open up the android directory in android studio and run the build

Deploying

Pull Requests

Each pull request will build the debug signet app and upload it internally to the github actions run.

Master

Each push to master will build a signed release version running in signet mode. The build process is almost identical to the release version.

Prereleased tags will be created for master.

Release

Android

First bump up the versionCode and versionName in ./andriod/app/build.gradle. The versionCode must always go up by one when making a release. The versionName can mimic package.json with an extra build number like 0.4.3-1 to make it easier to keep things looking like they are in sync when android only releases go out.

Publish a new tag like 0.4.3-1 in order to trigger a signed release version running in mainnet mode.

iOS

In ios/App/App.xcodeproj/project.pbxproj bump MARKETING_VERSION and then do whatever needs to be done in testflight to get it released.

Creating keys for the first time

  1. Generate a new signing key
keytool -genkey -v -keystore <my-release-key.keystore> -alias <alias_name> -keyalg RSA -keysize 2048 -validity 10000
openssl base64 < <my-release-key.keystore> | tr -d '\n' | tee some_signing_key.jks.base64.txt
  1. Create 3 Secret Key variables on your GitHub repository and fill in with the signing key information
    • KEY_ALIAS <- <alias_name>
    • KEY_STORE_PASSWORD <- <your key store password>
    • SIGNING_KEY <- the data from <my-release-key.keystore>
  2. Change the versionCode and versionName on app/build.gradle
  3. Commit and push.

Translating

Testing language keys

To check what keys are missing from your desired language:

just i18n $lang

Adding new languages or keys

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

    • When creating a new language file ensure it follows the ISO 639 2-letter standard
  2. 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 /public/i18n/jp.json and populate it with keys like so:

{
  "common": {
        "continue": "続ける",
        ...
    }
}

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

If you're using VS Code there are some nice extensions that can make this easier like i18n-ally and i18n-json-editor

  1. 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[] = [
    {
        value: "日本語",
        shortName: "jp"
    },
  1. 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!

mutiny-web's People

Contributors

alpeb-btc avatar benalleng avatar bennyhodl avatar benthecarman avatar elnosh avatar fernandoporazzi avatar futurepaul avatar gawlk avatar j0hncc avatar nk1tz avatar oleonardolima avatar sectore avatar suhailsaqan avatar tonygiorgio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mutiny-web's Issues

Payment failure should allow retrying payment

Whenever a payment failed trying to pay a unified address, it goes back to the home page when I click on the button.

If this failed because of lightning, I can see a few things happening to improve the experience here and not make the user scan the QR code again. Nobody likes having to do that twice.

  • Try Again Button
  • Offer to pay on chain instead
  • Always go back to the payment screen and let them try again or select on chain themselves

I think maybe clicking the X button might go back instead?

TBH Im not sure if it makes sense to have both an X button at the top and a button at the bottom. Button colored buttons are just much nicer, especially if we are taking up the whole page anyways.

Remove BDK Sync Log Category

It is no longer needed now that BDK does not log very much now. Other logs have and are still falling into the category and get hidden.

Reloading mutiny after a day or something causes some caching issues

The whole app fails to load on a blank gray screen.

Uncaught (in promise) non-precached-url: non-precached-url :: [{"url":"index.html"}]
    at O.createHandlerBoundToURL (https://signet-app.mutinywallet.com/workbox-30e9d199.js:1:13245)
    at Object.createHandlerBoundToURL (https://signet-app.mutinywallet.com/workbox-30e9d199.js:1:14916)
    at https://signet-app.mutinywallet.com/sw.js:1:2329
    at https://signet-app.mutinywallet.com/sw.js:1:565

User friendly redesign tracking issue

  • general ui

    • toast
    • modal
    • confirm dialog
  • Waitlist

    • You can sign up for the waitlist
    • You can be "approved" and see the actual wallet
    • Fix the flash on load
    • actually check with the backend for approval
  • Integration

    • Pull in node manager package and put it into a "context" object
    • Pick a better solution that react-query for doing async calls to node manager

- [ ] Setup
- [ ] a welcome screen prompting them to write down their seed
Setup moved to: #30

  • Home screen

    • show balance
    • balance polling
    • list activity
      • sends
      • receives (make sure to hide ones that we gave up on)
  • Send

    • scan qr codes
    • paste stuff
      - [ ] "WAILA" (what am I looking at... take the string and figure out what it is) #31
    • send lightning
    • send on-chain
      - [ ] send lnurl / lightning address #31
    • add amounts when relevant
    • add memo
      - [ ] confirm #32
    • success
      - [ ] fail #32
  • Receive

    • create lightning invoice
    • use lsp method for lightning invoice
    • create on-chain address (or should we do lightning receives only for now?)
    • display QR code
    • unified
    • success screen

- [ ] error page #33

- [ ] Settings
- [ ] seed info
- [ ] backup wallet to json (temp, for dev purposes)
- [ ] restore wallet from json (temp, for dev purposes)
- [ ] edit service servers (network, blocks, lsp, ws proxy)
#34

  • kitchen sink admin stuff
    • list peers
    • disconnect / delete peers
    • list channels
    • close channels

Dev reloading too much

I hit some pages sometimes and vite keeps trying to "optimize dependencies" and it reloads all my instances sparatically. Not sure what I need to do to turn that off.

5:05:02 PM [vite] ✨ new dependencies optimized: qr-scanner
5:05:02 PM [vite] ✨ optimized dependencies changed. reloading

Complaint box

No complaint is too small. What do you hate? What functionality are you missing? What could be more efficient to accomplish? Etc. No hard feelings, let it all out.

Add PoPs!

Would be cool to have proof of payment when you click on an invoice. We should have all this data already available.

Can't paste on firefox, leading to unable to send transactions

Uncaught TypeError: navigator.clipboard.readText is not a function
    handlePaste Send.tsx:114
    eventHandler dev.js:389
    delegateEvents dev.js:138
    <anonymous> ErrorBoundary.tsx:60
[Send.tsx:114:28](http://localhost:3420/src/routes/Send.tsx)
    handlePaste Send.tsx:114
    eventHandler dev.js:389
    (Async: EventListener.handleEvent)
    delegateEvents dev.js:138
    <anonymous> ErrorBoundary.tsx:60

Because I can't paste on firefox, I can't spend transactions since I can't manually type out into an input box.

Also, it is reasonable to have users decline clipboard access to websites and applications, so we need an input box.

Settings Page

  • Settings
    • seed info
    • backup wallet to json (temp, for dev purposes)
    • restore wallet from json (temp, for dev purposes)
    • edit service servers (network, blocks, lsp, ws proxy)

WAILA Sending

- [ ] "WAILA" (what am I looking at... take the string and figure out what it is)
- [ ] send lnurl / lightning address

Desktop layout

We also really gotta figure out how to make desktop not look like it's meant for blind grandma's, probably should have a good layout for that before we start building too many pages and stuff.

Our waitlist page seems to do a decent job at not stretching things all the way to the ends. Maybe start with something like that just for a quick win?

Screenshot from 2023-04-06 17-15-19

Originally posted by @TonyGiorgio in #13 (comment)

Move onchain funds to lightning

Now that we can open channels to the CLN LSP (MutinyWallet/mutiny-node#429), we should have some screen or some easy way to open channels to the configured LSP. Right now the only way to get funds onto lightning is to receive a lightning invoice.

I'm not sure if anything is required on the mutiny-node side for this but something we should probably have for the friends and family release.

Handle payment timeout

If a payment "fails" with a PaymentTimeout we want to show some sort of status like "it might be in flight but idk"

Mutiny+

TBD on what goes into it, but at least needs a page or something for the payment part and hiding something simple like a "supporter page" until we got some things to go in there.

Send Max button

Screenshot from 2023-04-27 14-20-52

I cant tell how much I have to send when I am trying to withdraw all

design review: receive screen improvements

Screenshot 2023-05-05 at 5 05 27 PM

  • polling indicator
  • under 10k warning
  • instructions for sharing the qr code / invoice
  • truncated preview string
  • real edit icons
  • disable unified / lightning when not available (under 10k case)

Take user home after send/receive "nice" action

After sending or receiving some bitcoin, it takes you to an empty send/receive screen. I don't think it's typical that users want to send more, or receive more after the first one. But even so, the home screen makes it really accessible to do so.

I think that makes the most sense but open to feedback.

Do not break webpage with javascript exceptions

I opened a channel, then clicked the home button, and my home page was filled with a javascript exception error:

Cannot read properties of undefined (reading 'time')

Clear errors and retry
TypeError: Cannot read properties of undefined (reading 'time')
    at get children [as children] (http://localhost:3420/src/components/Activity.tsx:110:120)
    at http://localhost:3420/src/components/Activity.tsx:39:32
    at Object.fn (http://localhost:3420/node_modules/.vite/deps/chunk-4GRR7IEI.js?v=4e54f4ba:337:60)
    at runComputation (http://localhost:3420/node_modules/.vite/deps/chunk-D6EXEMZE.js?v=4e54f4ba:755:22)
    at updateComputation (http://localhost:3420/node_modules/.vite/deps/chunk-D6EXEMZE.js?v=4e54f4ba:738:3)
    at createRenderEffect (http://localhost:3420/node_modules/.vite/deps/chunk-D6EXEMZE.js?v=4e54f4ba:229:5)
    at insert (http://localhost:3420/node_modules/.vite/deps/chunk-4GRR7IEI.js?v=4e54f4ba:337:3)
    at http://localhost:3420/src/components/Activity.tsx:39:5
    at _$$component.location (http://localhost:3420/src/components/Activity.tsx:41:5)
    at http://localhost:3420/@solid-refresh:25:42

Backup Dismissing

Currently when you dismiss the backup notification, it comes right back when you switch pages. This should ideally wait a little bit before showing again. Perhaps keep in memory until next reload should be fine without storing additional state?

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.