Giter Site home page Giter Site logo

Comments (8)

AndroDevcd avatar AndroDevcd commented on July 22, 2024

@abdrasulov Would this be an easy fix?

from bitcoin-kit-android.

AndroDevcd avatar AndroDevcd commented on July 22, 2024

It also appears that TransactionSerializer.serialize() is not working properly which may lead to the issue stated above. I have tested trying to deserialize transactions using raw hex returned from the network and it did not return a transaction where the txid != transaction.hash, my understanding is that the transaction id from the network should match the generated hash from the received transaction.

I have also tested the Test directory with tests testing the library and deserializing transactions and the expected tx hash was incorrect and failed the test. I think this may be the culprit or at the very least a good starting point.

from bitcoin-kit-android.

AndroDevcd avatar AndroDevcd commented on July 22, 2024

Okay nevermind the TransactionSerializer not working i didn't realize the toReversedHex() function was needed to view the human-readable hex value. However the problem still remains of the input and out put addresses being null or ""

from bitcoin-kit-android.

AndroDevcd avatar AndroDevcd commented on July 22, 2024

It actually looks like after further digging that fun extract(transaction: FullTransaction) { .. } may be the reason we have weirdness with addresses.

Is there a reason we only assign addresses and update the transaction if it is "Our" transaction? This seems like an easy thing to spot by the user hat incoming transactions will have a blank received from address.

from bitcoin-kit-android.

esen avatar esen commented on July 22, 2024

Hey @AndroDevcd ,

Not all the inputs and outputs may be filled with address field. Sometimes it's impossible. For example, if the input being sent is not in our storage, then we don't try to obtain it from the node. So we try to derive it from the input's signatureScript. For some input/output types like P2PKH or P2WPKHSH it's possible. For others it's not.

The reason why we extract addresses only for isMine transactions is that if it's not isMine, then it means it doesn't have any inputs or outputs concerning my wallet. So we just ignore it.

from bitcoin-kit-android.

AndroDevcd avatar AndroDevcd commented on July 22, 2024

Ahh okay, so then that basically means there's no way to know where the sender's bitcoin address was? I just wanted to be able to show on my app the address that the inbound sats came from but it sounds like this wouldn't be possible?

from bitcoin-kit-android.

esen avatar esen commented on July 22, 2024

Yes. For some (I’d say the most) inputs it’s impossible

from bitcoin-kit-android.

AndroDevcd avatar AndroDevcd commented on July 22, 2024

Okay sounds good, also @esen I will be submitting some PR's today for your wallet kit and bitcoin kit libraries that I think adds some nice touches and bug fixes

from bitcoin-kit-android.

Related Issues (20)

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.