Giter VIP home page Giter VIP logo

boltz-web-app's People

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

Watchers

 avatar  avatar  avatar  avatar

boltz-web-app's Issues

Catch and show error when fees of constructed transaction are greater than sum of inputs

image

 Uncaught (in promise) 
Object { message: 'Expected property "1" of type Satoshi, got Number -5846', __label: undefined, __property: 1, __type: Satoshi(value)
, __value: -5846, __valueTypeName: "Number", stack: "" }
​
__label: undefined
​
__property: 1
​
__type: function Satoshi(value)
​
__value: -5846
​
__valueTypeName: "Number"
​
message: 'Expected property "1" of type Satoshi, got Number -5846'
​
stack: ""

Remove Network fee update button

We are moving to interval updates, so in most cases the button won't do anything

Screenshot from 2023-06-05 15-37-21

Plus right now I don't know if there just is no update or if the button doesn't work since it doesn't give any feedback.

Especially on mobile we want to start getting rid of not frequently used highly advanced features like these.

Issues with max-digits

  • in BTC denomination . counts as digit leading to input value having 11, second value having 12 digits
  • it's a plain max digits enforcement no matter where the dot is and since second value is calculated down to 8 decimals:
    image

Keep amounts

Currently web app changes amounts back to default when

  • switching BTC/sats
  • switching pairs
  • switching pair directions
Screencast.from.04-11-2023.04.19.50.PM.webm

Trim Whitespace from address and invoice input

Saw these logs in the backend

Request /createswap {"type":"submarine","pairId":"L-BTC/BTC","orderSide":"sell","refundPublicKey":"023fde56004373be64fb19db721b21fc6a3c0ae417d6c044bfe19492e32cddae15","invoice":"lnbc110u1pj8pnfqpp569rs9ltd7h5dh2f9ql809vgwwy46enat6qpqxnth4kucfdtttassdqqcqzpgxqrrssrzjqvgptfurj3528snx6e3dtwepafxw5fpzdymw9pj20jj09sunnqmwqqqqqyqqqqqqqqqqqqlgqqqqqqgqjqnp4qgz6w7ean7qmwdnz9vduhqr80j7d2hpxlpmltgqnz784jjf6kd6nwsp55pv5le5ty60rms3rrxs9ptzxqunlmrn4s0cq5mezaj6mktlletgs9qyyssq9l5xv57nk88p7g22j4jrg2ps236mmzf2gr74c60purmpwsy0rmr38q59el8ghhcy595xpxat4ek3sy7ukx56mmdxa2rlmxry9rce98sqdkszh7 \n","referralId":"boltz_webapp"} failed: {"error":"Unknown character  "}

This is the relevant part:

rce98sqdkszh7 \n","referralId"

Refund & History as separate tabs

@dni and I debated back and forth a bit how to combine the use cases:

  • "sth went wrong with a swap, I want to refund" with
  • "I want a nice historical overview of all swaps, even the ones I started without sending money and also the ones still in progress"

and finally decided it's best to split these two up. Historically we had ""Check Status & Refund" combined which is probably hard to understand and not how the user's mental model works.

"Refund" @ boltz.exchange/refund- shows list of refundable swaps and refund file upload section, refund details page for a particular swap is boltz.exchange/refund/sWaPiD
"History" @ boltz.exchange/history - show all swaps from local storage. They link to different swap detail pages depending on their state

  • refundable swaps go boltz.exchange/refund/sWaPiD
  • failed (but non-refundable because e.g. no coins were sent) and successful swaps go to boltz.exchange/history/sWaPiD
  • in-progress swaps go to boltz.exchange/swap/sWaPiD where user can resume the swap.

Refund swap details page, should be separate

TBD since I am sure you thought about this @dni but noticed when I am in the refund overview @ boltz.exchange/refund and I click on a Swap I should have a refund overview page boltz.exchange/refund/vDTvI1 not boltz.exchange/swap/vDTvI1 also see PRD/wireframe

[Reverse Swaps] Decode and Verify Boltz Invoice

In order to stay trustless, web app has to

  • make sure invoice has same SHA256 hash webapp previously generated and used to /createswap, before showing invoice to user
  • make sure invoice amount is == with amount used to call /createswap, before showing invoice to user
  • make sure amount in api response from /createswap are as expected, before showing invoice to user

Feedback mega issue

  • my only feedback would be: if possible, show additional info once the lightning invoice is paid but before the swap confirms. ie. ack the lightning payment then show detail like “lighting payment received, ”
  • IMO "onchain address" might be more clear if it was "liquid address". not sure if anyone mentioned that yet.
  • when going from liquid to lightning, the help for the address/invoice is very clear, but when going the other way, it only says on-chain address, I think the placeholder could have a bit more info, like the address prefix or something like that
  • The UI does something "weird" with the numbers when changing focus, for instance, when first loading the page, it shows 10433/10000 and everything is stable. Once you just just click the up arrow, making it go to 10444, every time you move from one field to another, or even making alt/tab, the values change (even pressing and releasing shift does the same)
  • not easy to select/delete everything so you can paste a predefined value, numbers keep changing as you type them. Works better selecting with the mouse, but I haven't found a way to do it with the keyboard

Trim leading/trailing spaces

Have to trim spaces from the clipboard because input validation determines spaces illegal when pasting which is correct

Add "Lighting payment successfully set up!” string

Based on User feedback "my only feedback would be: if possible, show additional info once the lightning invoice is paid but before the swap confirms. ie. ack the lightning payment then show detail like “lighting payment received”

Minor swap box amount issues

  • pressing "delete" from 0.0005 or 0.005 or 0.00003 etc all goes to 0.0
  • CTRL+A any number in btc denomination and typing 0 creates "0.0" (instead of plain "0") whereas typing any other number like 8 correctly creates "8"
  • don't paste from clipboard if it contains not-allowed chars
    Screenshot from 2023-05-16 13-13-00

Default to empty input field with cursor active in "send" input field

This is the state we want when page load is done, send amount input field ready to take input, ideally also with a 0 as place holder like UniSwap does:

image

Reason?

  • we have virtually no chance of correctly guessing the amount the user wants to swap, we want to save the user trouble having to delete the prefilled amount as first step
  • it seeems to be industry standard, see above

[Reverse Swaps] "Keep your browser open" message vs. moving to 0-conf swaps only

Recent user feedback made it crystal clear that users don't get that they need to keep the browser tab open on mobile for it to be able to claim locked coins. Or rather go back to the browser after lightning invoice in another app. This problem arises when waiting for 1 confirmation, especially mainchain.

Options are to warn better OR imo better instead of trying to get users to understand this (many still won't) move the webapp to use 0-conf instant swaps only. Like this browser will claim seconds after lightning invoice was paid. And it almost never should be an issue.

Depends on BoltzExchange/boltz-backend#198

Quick opinion which way to go please! @dni @michael1011

Validate liquid/on-chain address right away when there is input

So that the field only goes yellow and enables the "Create Atomic Swap" Button when a valid liquid address is present. It is red otherwise.

Right now it only gives me the "invalid address" error after I pressed the Button (pay attention to the bottom part of the video):

Screencast.from.05-15-2023.01.19.49.PM.webm

Alby Connect Button

Discussion issue if we want that. Theoretically we could leave out asking for an invoice or showing the invoice alby provided if alby is connected to the boltz.exchange site. My counterargument would be that if a user connected alby to boltz.exchange but then wants to swap to his lightning mobile wallet which is not added to his alby he would first have to understand that the only way to do this is to disconnect alby.

So I would actually keep the flow exactly as is and the only difference between alby connected or not connected to boltz.exchange is that it doesn't bring up this permission window when I press the "WebLN" button to submit an invoice.

Screenshot from 2023-04-13 16-08-04

Reverse Swaps: verify locked on-chain amount = expected amount

Follow-up of #82. This issue is about webapp verifying make sure on-chain amount is the one used /createswap before claiming. Not trivial because webapp would need to query the mempool (0-conf swaps), ideally also double check that RBF is not enabled or query the chain to do so. Needs to be via 3rd party mempool api.

  • add to backend docs

BTC/Sats conversion error

Sometimes I still run into these weird, seemingly, conversion bugs that I don't really know how to reproduce.

image

Enable exact receive amounts

Since webapp let's you specify receive amount we want to make sure the user receives exact amount down to Satoshi, not the current "this or more" logic.

Widget

It's not an easy feat for even experienced webdevs to integrate boltz swaps into a website. Cryptography and Bitcoin need to be understood. This issue is the start of how a swap widget could look like.

It should allow for basic customization:

  • color, fonts etc
  • set referral id

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.