PayButton / paybutton-server

Manage eCash payments received through your online business.
MIT License
5 stars 2 forks source link

feat: BCH using chronik #843

Closed chedieck closed 1 month ago

chedieck commented 1 month ago

Related to #412

Description

Sets up Chronik for BCH.

Essentially meaning BCH network should now work normally, just as XEC does.

Test plan

Change config

Config should change now, check config/example-config.json. You can remove obsolete variables like grpcClient...URL, chronikClientURL and add the new networkBlockchainURLs variable:

  "networkBlockchainURLs": {
    "ecash": "https://xec.paybutton.io",
    "bitcoincash": "https://chronik.pay2stay.com/bch"
  },

...besides modifying networkBlockchainClients so that it says:

  "networkBlockchainClients": {
    "ecash": "chronik",
    "bitcoincash": "chronik"
  },

Also, remove the property networksUnderMaintenance so it won't inactivate BCH.

Now, after rebooting the containers, bitcoincash should sync and work normally.

Remarks

When working on this issue, I found some issues with Bitcoin Cash in the client.

I'll create a PR in the client to fix those.

Klakurka commented 1 month ago

Also we do already have a task for click-to-copy not working right on BCH: https://github.com/PayButton/paybutton/issues/417

Klakurka commented 1 month ago

Let's address the BCH success trigger in https://github.com/PayButton/paybutton/pull/403 instead.

chedieck commented 1 month ago

Also we do already have a task for click-to-copy not working right on BCH: PayButton/paybutton#417

Alright

Let's address the BCH success trigger in PayButton/paybutton#403 instead.

I don't follow.

  • Update 'Under Maintenance' network message

You have to remove it from your paybutton-config.json. Forgot to mention it in the description, updated.

* eCash is showing as disconnected for me in /networks
* Error when visiting /payments and /dashboard:

Could you confirm you are still getting those now?

Klakurka commented 1 month ago

I don't follow.

It's a client-side issue so let's just make sure it's working in https://github.com/PayButton/paybutton/pull/403.

Klakurka commented 1 month ago

@chedieck Before we merge this, what could we do for tests as I don't see any thing new added for this one.

chedieck commented 1 month ago

@chedieck Before we merge this, what could we do for tests as I don't see any thing new added for this one.

Just added some tests, making sure chronik works for both ecash and bitcoincash.