vulpemventures / marina

Liquid Wallet browser extension
MIT License
35 stars 16 forks source link

Wrong tL-BTC amount sent to extension from marina.sendTransaction #490

Closed jamesdorfman closed 1 year ago

jamesdorfman commented 1 year ago

I am running the following request to the marina wallet API from Google Chrome v115, as described in the API docs:

const submitTxClick = async (liquidAddr) => {
  const { txid, hex } = await window.marina.sendTransaction(
    [
      {
        address: liquidAddr, // the address of the recipient
        asset: "144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49", // test bitcoin
        value: 10000 // amount always expressed in satoshis
      }
    ],
  );
}

The actual transaction is sent correctly. However, before it is sent the confirmation window displays the incorrect balance:

Screenshot 2023-08-15 at 4 55 16 PM

This balance reads 8 no matter what value I pass into the API request.

I think this is likely related to the fact that I am running on testnet, and using test L-BTC. It is solely a UI bug, since the actual transaction ends up being broadcast with the right amount. Let me know what other information you need to reproduce this bug. Thanks!

louisinger commented 1 year ago

Indeed, some typo error in jsx component was diplaying the precision only. PR #491 should fix it, feel free to review it & test. Thanks for reporting, much appreciated :+1: