Giter Site home page Giter Site logo

Comments (3)

limpbrains avatar limpbrains commented on June 12, 2024

Hi!

So it's a good start. I didn't try to implement this.
The next big question - does zcashd have the same API to get history of regular shielded transactions

I suggest you to try tests. Recently I've created tests for each currency. Each tests runs cryptocurrency daemon in docker and uses testnet to get real transaction.

To run tests simple install docker and run docker-compose up in django-cc dir
Zcash tests runs pretty long, because of the shielded transactions.
If these tests will pass on your branch, then it is possible to get this feature into django-cc

Zcash tests https://github.com/limpbrains/django-cc/blob/master/cc/tests/tests_zcash_regtest.py

Cheers

from django-cc.

dahifi avatar dahifi commented on June 12, 2024

Yea, I believe in TDD. :)

I wish I knew enough about design patterns to be able to add a wrapper to add this functionality without modifying your app at all, I think the idiosyncrasies of this fork is going to be so different...

I'm still kinda new and learning what all the API calls do, but each z_address maintains it's own balance among the private total.

You can't query private txs like you can do on a public blockchain. There's no explorer on this thing at all, so if the daemon doesn't catch the operation... I think.

I'm going over the tests_mock module now. Can you tell me if the following tests are supposed to fail? It seems that the assertions should fail, IDK if there's something I'm missing here.

    def test_active_address(self):
        active = Address.objects.create(address='1111111111111111111114oLvT2', wallet=self.wallet, currency=self.btc, active=True)
        Address.objects.create(address='1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i', wallet=self.wallet, currency=self.btc, active=False)
        self.assertEqual(self.wallet.get_address(), active)

    def test_unused_address(self):
        unused = Address.objects.create(address='1Eym7pyJcaambv8FG4ZoU8A4xsiL9us2zz', wallet=self.wallet, currency=self.btc, active=False)
        Address.objects.create(address='LRNYxwQsHpm2A1VhawrJQti3nUkPN7vtq3', currency=self.ltc, active=True)
        self.assertEqual(self.wallet.get_address(), unused)

from django-cc.

limpbrains avatar limpbrains commented on June 12, 2024

No, they should not fail. Both are fine

from django-cc.

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.