Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(backend): simplify address balance query #13

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

ShookLyngs
Copy link
Contributor

Changes

Test

This is a random transaction I picked on the testnet of mempool.space:

GraphQL request:

{
  btcTransaction(txid: "b062e7a378e86731a8dae6f1940bd963c020ca4911bc4cb26256b5c77d529087") {
    vout {
      address {
        address
        satoshi
        pendingSatoshi
      }
    }
  }
}

Response:

{
  "data": {
    "btcTransaction": {
      "vout": [
        {
          "address": {
            "address": "tb1qc73j0up2l7rfahcj2g3yayccm9rjd5chr0uqyd",
            "satoshi": 11211,
            "pendingSatoshi": 5824
          }
        },
        {
          "address": {
            "address": "tb1qdaprd34l5kmvajgmpcakldu9a7dgtwmlkavh7v",
            "satoshi": 11602902,
            "pendingSatoshi": -6529
          }
        }
      ]
    }
  }
}

Screenshots:

@ShookLyngs ShookLyngs requested a review from Flouse July 25, 2024 09:18
Copy link

vercel bot commented Jul 25, 2024

@ShookLyngs is attempting to deploy a commit to the Cell Studio Team on Vercel.

To accomplish this, @ShookLyngs needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

@Flouse Flouse merged commit a005fc0 into main Jul 25, 2024
3 of 4 checks passed
@Flouse Flouse deleted the ref/simplify-balance-query branch July 25, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: btcAddress.balance = funded_txo_sum - spent_txo_sum
2 participants